How to set a tooltip for a button button

I have buttonbarone that has 3 buttons. I am trying to set a tooltip for each of the buttons, but I don’t know where. Itself buttonbarhas 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>

Leather for buttonbar-skins.bbSkin

The skin inside it for each button skins.bbbSkin

+3
source share
2 answers
<?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>
+3
source

If you want to display a tooltip using a spark ButtonBar, you need to control with skinClass. Take a look here: https://sensaran.wordpress.com/2010/07/19/setting-tooltip-for-spark-buttonbar

0
source

Source: https://habr.com/ru/post/1746809/


All Articles