If you start with ListItemRenderer, you definitely have to kill the code that will set the textfield's text property during the handshake with the List via the data/listData properties. But once you do that, it should measure correctly. I'd probably make a copy of ListItemRenderer instead of subclassing, and replace setting .text with setting .htmlText
The issue is not labelFunction, it just returns a string. It is what the renderer does with that string. Alex Harui Flex SDK Developer Adobe Systems Inc.<http://www.adobe.com/> Blog: http://blogs.adobe.com/aharui From: [email protected] [mailto:[email protected]] On Behalf Of Brandon Krakowsky Sent: Tuesday, March 24, 2009 9:21 AM To: [email protected] Subject: Re: [flexcoders] HTML in the List Component? Yeah, I'm having a hard time with this. I'm trying to display auto-sized html in a list component. It just never looks right. Sometimes there is too much padding on the bottom, sometimes, not enough and the text is cut-off. And one I start scrolling, forget it. It keeps changing. I must be missing something. If the labelFunction supported HTML I'd be set, as the sizing on this seems fine. I'm rolling my own "list", based on a VBox. Thanks, Brandon ________________________________ From: Jeffry Houser <[email protected]> To: [email protected] Sent: Tuesday, March 24, 2009 11:07:53 AM Subject: Re: [flexcoders] HTML in the List Component? Based on my recent experience w/ this; I gave up trying to display HTML Text in a list using the default itemRenderer ( ListItemRenderer if memory serves me ). In theory, setting ListItemRenderer. label.htmlText should work In practice, it always reverted to 'normal' text when displayed in the context of a list. I built my own itemRenderer using a label and that addressed my issue. I ran into this issue while building the Flextras AutoCompleteComboBo x. The ComboBox drop down is just a list, for those that haven't cracked open the code. The AutoComplete will support highlighting in the drop down, based on the filter text. All baked right in. I'll be sending the next beta to beta testers in a few hours. Brandon Krakowsky wrote: I have a List component with both variableRowHeight and wordWrap set to true. Is there anyway to leverage the labelField or labelFunction to render html text? Is the only way to create a custom itemRenderer? I tried it but find it very difficult to set the height of a UITextField, added to a Canvas. Thanks, Brandon -- Jeffry Houser, Technical Entrepreneur Adobe Community Expert: http://tinyurl. com/684b5h<http://tinyurl.com/684b5h> http://www.twitter. com/reboog711<http://www.twitter.com/reboog711> | Phone: 203-379-0773 -- Easy to use Interface Components for Flex Developers http://www.flextras.com?c=104 -- http://www.theflexshow.com http://www.jeffryhouser.com -- Part of the DotComIt Brain Trust

