2 Replies Latest reply on Sep 10, 2009 10:38 PM by jdesko

    Sparks ButtonBar tooltip


      I would like the buttons in the Sparks ButtonBar to display the label or data from its DataProvider; there is no ToolTipField.  I've added script in a custom ButtonBarSkin using a creationcomplete event as in below - however, I am adding and removing buttons so this stops working after that.  I've tried the same code (below) in the custom skin using mouseOver, but mouseOver doesn't seem to trigger.  Not sure if there is another event that picks up adding and removing a button to set the tooltips. 

      Picture 1.png

      I also tried binding the data to the ButtonBar.tooltip but this didn't work (probably user error).

        • 1. Re: Sparks ButtonBar tooltip
          Flex harUI Adobe Employee

          I think you'd customize the renderers something like this (In a custom ButtonBarSkin)


                  <fx:Component id="middleButton" >

                      <s:ButtonBarButton skinClass="spark.skins.spark.ButtonBarMiddleButtonSkin" contentChange="tooltip=data" />



          Assuming data is just a string.  I didn't actually try it though.


          Alex Harui

          Flex SDK Developer

          Adobe Systems Inc.

          Blog: http://blogs.adobe.com/aharui

          1 person found this helpful
          • 2. Re: Sparks ButtonBar tooltip
            jdesko Level 2

            Thank you very much Alex for the help.


            There is no contentChange event for the suggestion that you had shown, but it worked with mouseOver as shown below.


                    <fx:Component id="lastButton" >

                        <s:ButtonBarButton skinClass="skins.components.MenuButtonBarButtonSkin" mouseOver="toolTip=data.label"/>