You should just replace the dropdownFactory with a modified ClassFactory
for a list with properties { iconFunction: myFunction }

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Dave Glasser
Sent: Monday, November 26, 2007 11:47 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Showing icons in ComboBox dropdowns



I need to show icons next to the items in a ComboBox dropdown. Unlike
the List class, the ComboBox has no iconFunction property, and its
default item renderer class, ListItemRender, has a *protected* icon
property. 
 
I tried accessing the ComboBox's dropdown property directly, but that
didn't work out well. Since it seems to use a different ListBase
instance each time its displayed, the dropdown's labelFunction property
has to be set in a DropdownEvent.OPEN handler, and this event is fired
*after* the dropdown is visible, so you intially see the dropdown
without icons and then the icons appear.
 
It seems that to accomplish this, I'll have to, at minimum, subclass
ListItemRenderer. But this seems a rather cumbersome solution for what I
suppose is a common need. Is there an easier way to do this?

 

Reply via email to