views:

745

answers:

3

It appears there is no prompt property for the spark Combobox component as there was with the mx version. Anyone have a simple workaround for this or know something I'm just absentmindedly overlooking? Thanks in advance.

+2  A: 

There are now two 'combobox' like components in Spark, fx:Combobox and fx:DropDownList. DropDownList has a prompt component and behaves quite a bit like the old flex 3 combobox. I think you'll just need to switch components and you should be able to set a prompt.

http://help.adobe.com/en_US/flex/using/WSc2368ca491e3ff92-59bf082612135c9e688-7fff.html

quoo
A: 

Thanks for the suggestion. The only issue I had with the DropDownList was that I wanted the TextInput field available in the ComboBox too. Guess I can just have the prompt as part of the dataprovider. Thanks again.

jjj
A: 

Hi! To solve this problem, just add this property to the s.ComboBox:

selectedItem="{{label:'- Select One-'}}"

with this solution you can have a prompt without adding any row to your dataProvider

marcocb