给ButtonBar组件设置自定义TOOLTIP。
toolTipField
属性.示例:
代码:
<?xml version="1.0" encoding="utf-8"?>
<!-- http://blog.flexexamples.com/2008/04/27/setting-a-custom-tool-tip-field-on-a-buttonbar-control-in-flex/ -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical"
verticalAlign="middle"
backgroundColor="white">
<mx:Array id="arr">
<mx:Object label="Accordion"
toolTip="Le Accordion"
icon="@Embed('assets/Accordion.png')" />
<mx:Object label="ApplicationControlBar"
toolTip="Le ApplicationControlBar"
icon="@Embed('assets/ApplicationControlBar.png')" />
<mx:Object label="Box"
toolTip="Le Box"
icon="@Embed('assets/Box.png')" />
<mx:Object label="Canvas"
toolTip="Le Canvas"
icon="@Embed('assets/Canvas.png')" />
<mx:Object label="ControlBar"
toolTip="Le ControlBar"
icon="@Embed('assets/ControlBar.png')" />
</mx:Array>
<mx:ButtonBar id="buttonBar"
dataProvider="{arr}"
labelField="label"
toolTipField="toolTip"
iconField="icon"
height="32" />
</mx:Application>
<!-- http://blog.flexexamples.com/2008/04/27/setting-a-custom-tool-tip-field-on-a-buttonbar-control-in-flex/ -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical"
verticalAlign="middle"
backgroundColor="white">
<mx:Array id="arr">
<mx:Object label="Accordion"
toolTip="Le Accordion"
icon="@Embed('assets/Accordion.png')" />
<mx:Object label="ApplicationControlBar"
toolTip="Le ApplicationControlBar"
icon="@Embed('assets/ApplicationControlBar.png')" />
<mx:Object label="Box"
toolTip="Le Box"
icon="@Embed('assets/Box.png')" />
<mx:Object label="Canvas"
toolTip="Le Canvas"
icon="@Embed('assets/Canvas.png')" />
<mx:Object label="ControlBar"
toolTip="Le ControlBar"
icon="@Embed('assets/ControlBar.png')" />
</mx:Array>
<mx:ButtonBar id="buttonBar"
dataProvider="{arr}"
labelField="label"
toolTipField="toolTip"
iconField="icon"
height="32" />
</mx:Application>