Hi,

Here is the code:

Step1: Create one renderer class

*package*

{

      *import* mx.controls.Label;

      *import* mx.states.SetStyle;



      *public* *class* ToolTipRenderForCmb *extends* Label{

            *private* *var* toolTipText:String;

            *public* *function* ToolTipRenderForCmb(){

                  *super*();



                  setStyle(*"fontSize"*,*"12"*);

            }



        *override* *protected* *function* commitProperties():*void*{

              *super*.commitProperties();



              toolTipText =*this*.text

              *this*.textField.toolTip = toolTipText;

        }



      }

}


Step2: add the above renderer to Combobox


<mx:ComboBox prompt="Select Account" id="selectComb"
labelField="label" dropdownWidth="250" width="250"

itemRenderer="ToolTipRenderForCmb"/>


it will work.



Thanks,

Nithya




On Wed, Sep 8, 2010 at 5:36 AM, Kumar <[email protected]> wrote:

> Hi,
>
>  I need to display a tooltip same as the displayed item for each one.
>
>
> Can some one help me to do this with the help of below code lines....
>
> var accountsData:XML;
> var acctCollection:XMLListCollection;
> var accArray:ArrayCollection;
>
> accountsData = new XML(e.result);
> acctCollection = new XMLListCollection(accountsData.listItem);
> accArray = new ArrayCollection(acctCollection.toArray());
> selectComb.dataProvider = accArray;
>
> <mx:ComboBox prompt="Select Account" id="selectComb"
> labelField="label" dropdownWidth="250" width="250"/>
>
> Thanks in advance...
> Kumar.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Flex India Community" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<flex_india%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/flex_india?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en.

Reply via email to