Use ControlBar to wrap ColorPicker and Button : ColorPicker « Components « Flex






Use ControlBar to wrap ColorPicker and Button

       


<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Panel id="panel" width="250" height="200">
    <mx:TextArea id="textArea" width="80%" height="80%" text="Example" />
    <mx:ControlBar>
        <mx:Button label="Random Font Size" click="textArea.setStyle('fontSize', Math.random( ) * 20 + 8)" />
        <mx:ColorPicker id="color" change="panel.setStyle('backgroundColor', color.value)" />
    </mx:ControlBar>
</mx:Panel>
</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.Set color for ColorPickerSet color for ColorPicker
4.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
5.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.
6.Bind HBox backgroundColor to ColorPicker colorValueBind HBox backgroundColor to ColorPicker colorValue
7.GridItem Label, ColorPickerGridItem Label, ColorPicker
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