You can bind the width of the text field to the dimensions of its parent:
<mx:Canvas id="mainContainer" width="100%" height="100%" styleName="debug1">
<mx:Text width="{mainContainer.width}" text="here is a very very
very very very very very very very very very very very very very very very
very very very very very very very very very very very very very very very
very very very very long piece of text." />
</mx:Canvas>
This way you don't have to use a 'hard' width. Kind of a hack, I know.
Glad you figured it out in the end tho!
C
On Tue, Nov 24, 2009 at 7:38 PM, Amy <[email protected]> wrote:
>
>
>
>
> --- In [email protected] <flexcoders%40yahoogroups.com>, Chris
> <zomgfore...@...> wrote:
> >
> > Could this be related to resizeToContent on TabNavigator? Alternatively,
> it
> > may be an issue with your dataprovider. Source would be helpful...
>
> Here's what the issue was:
>
> My renderer had a Repeater in it that had Text components that had a
> percentage width on them. Apparently, when the measure() function was called
> on them, they had a teeny width and reported an inaccurately tall height,
> but by the time they showed up on the screen, they had laid themselves out
> well enough to hide the problem. Good old Flex invalidation didn't catch
> whatever changes they did in the background to accomplish this, so I spent
> several hours refreshing my memory about the finer details of the code of
> List, ListBase, Box, BoxLayout, UICompoinent, Container, ViewStack, etc.
>
> The fix turned out to be simply setting a "hard" width on the Text
> component, but of course that makes it infinitely less flexible than if it
> could have possibly worked with a percentage.
>
> What a fun way to spend an evening!
>
>
>