Flex3 Combobox doesn't display itemRenderer when closed

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" />

您需要在组合框上设置labelField或labelFunction属性以显示与您的itemrenderer相同的内容。

链接地址: http://www.djcxy.com/p/34574.html

上一篇: Flex Combobox:取消选择

下一篇: Flex3 Combobox在关闭时不显示itemRenderer