开发者

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜