Change panel style in ColorPicker change event
<?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