Creating A Flex ButtonBar That Displays Tool Tips

I was recently trying to get a mx:ButtonBar to display a tool tip for each button. I was following the instructions provided in the Flex 2.01 Developer's Guide, where it describes using an array of Objects, with each Object having a label, tooltip, and icon field. However, my tool tips were not showing up.

After some testing, I learned that the tooltip field must be named "toolTip" (note the second T is upper case) and not "tooltip" as the Flex documentation stated. Once I made that change, my tool tips appeared.

You can display a test of this by visiting my button bar example. Right click on the example application to view the source. You'll see that the first array of Objects (dp1) that is the data provider for the top mx:ButtonBar uses "toolTip" as the field name. The second array of Objects (dp2) that is the data provider for the bottom mx:ButtonBar uses "tooltip" as the field name.

If you mouse over the top ButtonBar's buttons you'll see the tool tip. If you mouse over the bottom bar's buttons, you don't see the tool tip.

I've posted a comment about this to the Flex Developer's Guide LiveDocs.

Comments
Perfect timing! I was looking at how to do this only yesterday! Thanks.
# Posted By Jamie Badman | 2/21/07 2:34 AM
BlogCFC was created by Raymond Camden. This blog is running version 5.1.004.