i am working in Air application in Flex3 , i need know how to set "selectedItem" Property when we have 2 values like(data and label) label property to combobox selection, data value for our input.
Like shown below.
In (selectedItem="{stylename}") stylename will have "data" value but i need to set that "lable" property as selected value in combobox.
Like if stylename is "checked" then the ComboBox selected item need to be "Checked".
How to implement this in flex ….
Thanks in Advance
Best Answer
ComboBox.selectedItem
is looking for anObject
. You are passing it aString
literal. Where is "stylename" being set? If this is coming from an external source, you can retrieve the item to be selected in a setter function:ActionScript 3:
MXML: