开发者

flex 3 combobox selected item

开发者 https://www.devze.com 2023-01-17 00:17 出处:网络
I have a combobox with arrayCollection dataprovider, it has nothing s开发者_运维百科elected after creation. I want to add some text as first option when nothing is selected, just to indicate that the

I have a combobox with arrayCollection dataprovider, it has nothing s开发者_运维百科elected 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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消