Hi Paddy,

Thanks for the reply. I'm not using TextArea because I don't need
editing functionality but I suppose it's an alternative.

I am choosing the option to compile my .css file into a swf in
FlexBuilder (for compilation and efficiency reasons with embedded
fonts). Does that affect how Flex measures items?

Thanks,
Peter

--- In flexcoders@yahoogroups.com, "Paddy Keane" <[EMAIL PROTECTED]> wrote:
>
> you could always try using a TextArea component instead of a Text
component. BTW are you using runtime css? (i.e a swf you load
containing css styles for your app) paddy;)
> 
> ________________________________
> 
> From: flexcoders@yahoogroups.com on behalf of I am Peter, not Lena
> Sent: Sat 21/06/2008 10:23
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Test contro height question
> 
> 
> 
> Hi All,
> 
> I'm still trying to learn the intricacies of Flex and the auto sizing
> of Text control's height (and the related word wrapping) is still one
> area that really confuses me. 
> 
> For example, I have a text control:
> 
> <mx:Text id="nameText" width="250" text="{transaction.name}"/>
> 
> When the transaction object is set for the first time, and
> transaction.name is longer than 250, only the first line is shown.
> There is no wrapping. I would think that the explicit width 250 would
> force word wrapping but this is not the case.
> 
> If I select another transaction in the UI, and then re-select the
> original transaction, then the text control is correctly resized with
> word wrapping. Why is this happening? What causes this strange behavior?
> 
> And the only way I can get word wrapping to work is to bind the text
> control's width to it's parent's width:
> 
> <mx:Text id="nameText" width="{this.width-200}"
> text="{transaction.name}"/>
> 
> This isn't really desirable though, because if the text is inside a
> form item, then it is quite difficult to figure out what correct width
> of the text should be (because the width is determined by the longest
> label of all the form items, I believe).
> 
> Sometimes, though, I can get the text control to resize correctly by
> calling validateNow(). But this doesn't always work. Why is that?
> 
> Anyways, any insights on these perplexing questions would be much
> appreciated.
> 
> Thanks,
> Peter
>


Reply via email to