Set a different text color for each Accordion buttons
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="600"
height="600" creationComplete="setButtonStyles();">
<mx:Script>
public function setButtonStyles():void {
comp.getHeaderAt(0).setStyle('color', 0xAA0000);
comp.getHeaderAt(1).setStyle('color', 0x00AA00);
}
</mx:Script>
<mx:Accordion id="comp">
<mx:VBox label="first box">
<mx:TextInput />
<mx:Button label="Button 1" />
</mx:VBox>
<mx:VBox label="second box">
<mx:TextInput />
<mx:Button label="Button 2" />
</mx:VBox>
</mx:Accordion>
</mx:Application>
Related examples in the same category