PDA

View Full Version : ComboBox Multiline or word-wrap (Flex 3)


Betard
01-28-2009, 02:31 PM
Hi There,

I have a ComboBox and I am running into an issue with the drop-down items being 'cut off' due to their length exceeding the ComboBox width, I have set the dropdownWidth to be wider which helped with many of the items, but I can not set that width any wider without affecting my desired layout.

Is there a way to have the string wrap if it does not fit the set width? Thus, taking up 2 lines worth of space for that particular item.

drkstr
01-28-2009, 04:11 PM
I think you should be able to set the itemRenderer of the ComboBox to a Text component that wraps it's text.


Best Regards,
~Aaron

Peter Cowling
01-28-2009, 04:58 PM
The ever-cool flex examples (http://blog.flexexamples.com/2007/09/25/creating-a-custom-combobox-item-renderer-in-flex/) blog does a good job of illustrating this one.

Betard
01-28-2009, 05:03 PM
Thanks Peter and drkstr, I'll give these solutions a look and see if I can adapt.

Much Appreciated!