Set color for ColorPicker : ColorPicker « Components « Flex






Set color for ColorPicker

Set color for ColorPicker
       
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
    <mx:Script>
        
        [Bindable]
        public var simpleDP:Array = ['0x000000', '0xFF0000', '0xFF8800',
            '0xFFFF00', '0x88FF00', '0x00FF00', '0x00FF88', '0x00FFFF',
            '0x0088FF', '0x0000FF', '0x8800FF', '0xFF00FF', '0xFFFFFF'];
      
    </mx:Script>
    <mx:ColorPicker id="cp" dataProvider="{simpleDP}" />
</mx:Application>

   
    
    
    
    
    
    
  








Related examples in the same category

1.ColorPicker change eventColorPicker change event
2.Get current selected color from ColorPickerGet current selected color from ColorPicker
3.Add an event listener for a change event and an open event to ColorPickerAdd an event listener for a change event and an open event to ColorPicker
4.ColorPicker uses an Array of Objects with three fields: color, label, and descript.ColorPicker uses an Array of Objects with three fields: color, label, and descript.
5.Bind HBox backgroundColor to ColorPicker colorValueBind HBox backgroundColor to ColorPicker colorValue
6.GridItem Label, ColorPickerGridItem Label, ColorPicker
7.Use ControlBar to wrap ColorPicker and Button
8.Change panel style in ColorPicker change eventChange panel style in ColorPicker change event
9.Use a ColorPicker to Set Canvas ColorUse a ColorPicker to Set Canvas Color
10.Populate a ColorPicker with a simple array of colors.Populate a ColorPicker with a simple array of colors.
11.ColorPicker EventsColorPicker Events
12.A ColorPicker uses an Array of Objects with three fields: color, label, and descriptA ColorPicker uses an Array of Objects with three fields: color, label, and descript
13.ColorPicker with Custom Field NamesColorPicker with Custom Field Names