The following worked for me.  If your dataProvider is assigned later
that might make a difference.

 

                                                var foo:ComboBox = new
ComboBox();

                                                addChild(foo);

                                                foo.y = 100;

                                                foo.editable = true;

                                                foo.dataProvider =
['Gordon', 'Alex'];

                                                foo.selectedIndex = -1;

                                                foo.text = "nuts";

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Mike_Robinson_98
Sent: Tuesday, March 25, 2008 12:08 PM
To: [email protected]
Subject: [flexcoders] Flex 3 ComboBox and Editable property

 

Hi,

I'm attempting to migrate from Flex2 to 3. One issue I'm have is with
the ComboBox. In particular, with the Editable property set true.

Previously, if I wanted to set an editable combobox to display a value
OTHER than one of the values in the dataProvider (an ArrayCollection
of Strings), I just set the 'text' property to some string. In Flex3,
this does not seem to have any effect. I even added setting the
selectedIndex to -1, first but still no change. The desired text value
does not show up, just the 1st element of the dataProvider.

cb_freight.selectedIndex = -1;
cb_freight.text = "This is a test";

Anyone else found this the case?

 

Reply via email to