6/25/10

Combobox Tooltip

In flex combobox when we simply give tooltip , it will not display tooltip for those item in the list. Fortunately there is a way. We can have an itemrenderer.
following example will illustrate that.



<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="top"
        backgroundColor="white">

    <mx:Array id="arr">
        <mx:Object label="First" />
        <mx:Object label="Second" />
        <mx:Object label="First Plus Second" />
      
    </mx:Array>

    <mx:ComboBox id="cb"
            dataProvider="{arr}"
            itemRenderer="mx.controls.Label"
toolTip="{cb.text}"
            width="200" />

</mx:Application>

No comments:

Post a Comment

Popular Posts