给ButtonBar组件设置自定义TOOLTIP。
生活随笔
收集整理的這篇文章主要介紹了
给ButtonBar组件设置自定义TOOLTIP。
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
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>
示例:
代碼:
? <?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>
轉(zhuǎn)載于:https://www.cnblogs.com/xxcainiao/archive/2008/04/29/1176583.html
總結(jié)
以上是生活随笔為你收集整理的给ButtonBar组件设置自定义TOOLTIP。的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 解决IntelliJ Idea中文乱码问
- 下一篇: 狗窝里的小日子- 5 ...