Flex 2.0.1 ComboBox with icon support

Flex 2.0.1 ComboBox with icon support.

April 28th, 2007

from: http://www.flexibleexperiments.com/?p=25

Sometimes a ComboBox with icons in the list as well as in the text display area can be useful. However the out of the box Flex ComboBox component dosn’t support this. Here is one way of doing it.

IconComboBox2

Basically I’ve extended the existing ComboBox adding iconField and iconFunction properties. I had to instance my own ClassFactory for the internal list that is used as the dropdown so that I could pre-initialize the required properties. I override the measuredWidth so that I can make room for the icon, and adjust the x position of the internal textInput to compensate.

A little addition to the toolbox that can come in really handy.

Sample and Source : http://www.flexibleexperiments.com/Flex/IconComboBox/Blog_Post_IconCombobox.html


Enjoy.

Jason Hawryluk

 

Share

0 条评论

留下评论