You should set the Text's width to some portion of the item renderer's
explicitWidth before measuring the Text.

 

Note that ListItemRenderer already does wordwrapping and uses TextField
instead of the heavier Text component.

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of geraldshastri
Sent: Monday, April 07, 2008 4:54 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Determining text control's height in a
ListItemRenderer.

 

Hi,

I have made a custom control by extending the ListItemRenderer to use
as an itemRenderer with a list control. This custom component has some
images and text controls. But I am having trouble sizing the Text
controls. The Text control can have a varying width depending upon the
width of the component, but then how do I set the height of the Text
control? The list is set to use variable row heights.

I referred to
http://tech.groups.yahoo.com/group/flexcoders/message/105824
<http://tech.groups.yahoo.com/group/flexcoders/message/105824>  which
seems to be a similar problem, but I am not able to figure it out.

Thanks for any help.

 

Reply via email to