views:

108

answers:

1

I have a buttonbar that has 3 buttons. I'm trying to set a tooltip for each of the buttons, but not sure where. The ButtonBar itself has a skin, which in turn includes a skin for each of the buttons.

<s:ButtonBar id="bb" selectedIndex="0" skinClass="skins.bbSkin">
     <s:dataProvider>
          <s:ArrayList>
              <fx:Object label="item1" />
              <fx:Object label="item2" />
              <fx:Object label="item3" />
         </s:ArrayList>
     </s:dataProvider>
</s:ButtonBar>

The skin for the buttonbar is skins.bbSkin

The skin inside it for each button is skins.bbbSkin

+2  A: 
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:ButtonBar id="bb" selectedIndex="0" toolTipField="tooltip">
    <mx:dataProvider>
         <mx:Array>
             <mx:Object label="item1" tooltip='hello1'/>
             <mx:Object label="item2" tooltip='hello2'/>
             <mx:Object label="item3" tooltip='hello3'/>
        </mx:Array>
    </mx:dataProvider>
   </mx:ButtonBar>
</mx:Application>
Ankur Sharma
<?xml version="1.0" encoding="utf-8"?><mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"><mx:ButtonBar id="bb" selectedIndex="0" toolTipField="tooltip"> <mx:dataProvider> <mx:Array> <mx:Object label="item1" tooltip='hello1'/> <mx:Object label="item2" tooltip='hello2'/> <mx:Object label="item3" tooltip='hello3'/> </mx:Array> </mx:dataProvider> </mx:ButtonBar></mx:Application>
Ankur Sharma
hey plzz use this code in comments, i did put that in answer, but don't know the code is not getting displayed,use toolTipField property of the button bar
Ankur Sharma
I fixed it for you. You need to paste the code in, select it all and then click the code icon in the wysiwyg (it looks like 1's and 0's)
Ryan Guill
Thanx Ryan for this, i was a bit confused wht to do in this case, so i pasted the code in comments
Ankur Sharma