小小菜鸟的web菜园子

web开发学习。好记性不如烂笔头。每天进步一点点!

导航

给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>

posted on 2008-04-29 17:33  『小小菜鸟』  阅读(848)  评论(0编辑  收藏  举报