seismael
seismael

Reputation: 227

flex 3 combobox selected item

I have a combobox with arrayCollection dataprovider, it has nothing selected after creation. I want to add some text as first option when nothing is selected, just to indicate that the user didn't select an option yet.

Upvotes: 2

Views: 1567

Answers (1)

Carlos
Carlos

Reputation: 2513

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

Upvotes: 3

Related Questions