开发者

spark buttonbar ... change label on rollover

开发者 https://www.devze.com 2023-01-16 01:30 出处:网络
I\'ve 开发者_如何学运维got a spark buttonbar w/ a dataprovider as follows: \' <s:ArrayCollection id=\"arr\">

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';
0

精彩评论

暂无评论...
验证码 换一张
取 消