views:

98

answers:

1

Hi,

I have a combobox with arrayCollection dataprovider, it selects nothing at start, but i see the first object label as selected, i want to add select text, as first option that selects nothing, just to indicate that the user didn't select an option yet.

+2  A: 

If I understood you correctly, prompt property is what you are looking for. To quote the ComboBox documentation from Flex 3:

The prompt for the ComboBox control. A prompt is a String that is displayed in the TextInput portion of the ComboBox when selectedIndex = -1. It is usually a String like "Select one...". If there is no prompt, the ComboBox control sets selectedIndex to 0 and displays the first item in the dataProvider.

Quote from ComboBox documentation

Carlos
perfect :) i didn't notice that
seismael
@Carlos: Hi Kalle! Currently I have no access to your `My Documents` folder, so you should either change the permissions to share this folder or correct the URL to link to Adobe's online documentation. ;-)
splash
@splash Oops :D Thanks for the info. Removed the link.
Carlos