djsodom
07-13-2006, 03:14 PM
I'd like to change the fontcolor of a selected item in a list (ie. you click on the list item and it changes colors or font weight).
Here is my partical mxml which does not work:
<mx:Script>
<![CDATA[
private function answerSelected(even:flash.events.Event):void {
event.target.selectedItem.setStyle("fontColor", "red");
}
<mx:VBox>
<mx:List id="answers" dataProvider="{myCollection"} change="answerSelected" />
</mx:VBox>
I've been struggling with these for 2 days...you're help is appreciated.
Steve
Here is my partical mxml which does not work:
<mx:Script>
<![CDATA[
private function answerSelected(even:flash.events.Event):void {
event.target.selectedItem.setStyle("fontColor", "red");
}
<mx:VBox>
<mx:List id="answers" dataProvider="{myCollection"} change="answerSelected" />
</mx:VBox>
I've been struggling with these for 2 days...you're help is appreciated.
Steve