spark buttonbar ... change label on rollover
I've 开发者_如何学运维got a spark buttonbar w/ a dataprovider as follows: '
<s:ArrayCollection id="arr">
<s:source>
<fx:Object label="Dave" addr="123 Main" />
<fx:Object label="Brenda" addr="456 Center" />
</s:source>
</s:ArrayCollection>
'
By default, the button's labels will be "Dave" and "Brenda", respectively. How can I dynamically change the label to the "addr" field when a user rolls over the button?
Add a mouseOver event handler to the ButtonBar. In the event handler do something like this:
buttonBar.labelField = 'addr';
In a mouseOut event handler do something like this:
buttonBar.labelField = 'label';
精彩评论