Using ActionScript 3.0 Components |
|
|
|
| Customizing the UI Components > Customizing the ColorPicker > Using Styles with the ColorPicker | |||
You can set several styles to change the appearance of the ColorPicker component. For example the following procedure changes the number of columns (columnCount) in the ColorPicker to 12, changes the height (swatchHeight) and width (swatchWidth) of the color swatches, and changes the padding for both the text field (textPadding) and the background (backgroundPadding).
To change the appearance of the ColorPicker with styles:
aCp.setStyle("columnCount", 12);
aCp.setStyle("swatchWidth", 8);
aCp.setStyle("swatchHeight", 12);
aCp.setStyle("swatchPadding", 2);
aCp.setStyle("backgroundPadding", 3);
aCp.setStyle("textPadding", 7);
|
|
|
|