Reputation: 1957
I have a combobox with a custom itemRenderer. The ItemRenderer displays some images and a label. When the combobox opens, the items in the dropdown list display perfectly, but when its closed, the combobox doesn't use the ItemRendere, but shows "[object MyItem]". Do I need another attribute to indicate that the ItemRender also needs to be used when closed?
This is my tag:
<mx:ComboBox dataProvider="{myItems}" id="itemsCombo" itemRenderer="org.test.myComboBoxItemRenderer" />
Upvotes: 3
Views: 669
Reputation: 3119
you need to set the labelField or labelFunction property on the combobox to show the same thing as your itemrenderer.
Upvotes: 4