The following example shows how you can control the Button control’s text color using the color, disabledColor, textRollOverColor, and textSelectedColor styles.
Full code after the jump.
<?xml version="1.0" encoding="utf-8"?>
<!-- http://blog.flexexamples.com/2007/08/26/changing-a-button-controls-text-color/ -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical"
verticalAlign="middle"
backgroundColor="white">
<mx:ApplicationControlBar dock="true">
<mx:Label text="color:" />
<mx:ColorPicker id="colorCB" />
<mx:Spacer width="33%" />
<mx:Label text="textRollOverColor:" />
<mx:ColorPicker id="textRollOverColorCB" />
<mx:Spacer width="33%" />
<mx:Label text="textSelectedColor:" />
<mx:ColorPicker id="textSelectedColorCB" />
<mx:Spacer width="33%" />
<mx:Label text="disabledColor:" />
<mx:ColorPicker id="disabledColorCB" />
<mx:CheckBox id="enabledCh" label="enabled" selected="true" />
</mx:ApplicationControlBar>
<mx:Button id="button"
label="Label"
toggle="true"
enabled="{enabledCh.selected}"
color="{colorCB.selectedColor}"
disabledColor="{disabledColorCB.selectedColor}"
textRollOverColor="{textRollOverColorCB.selectedColor}"
textSelectedColor="{textSelectedColorCB.selectedColor}" />
</mx:Application>
View source is enabled in the following example.




how can i chagned the background color of button? on mouseover
Is it possible to change the font color of the “Selected Up” state? I think it would have to be done in a customized Button component.