Hello, forum
Thank you very much for the possibility to use TextFlow in Flex 3. I'm using the technique as Mihai Corlan by doing the following thing:
There is a TextFlow instance and a ParagraphElement added to it.
var p : ParagraphElement = new ParagraphElement();
span.text = 'Disc VERBATIM DVD+RWs 4x Jewel Case 5';
p.addChild(span);
_textFlow.addChild(p);
The TextContainer is a Sprite and it is added as canvLabel.rawChildren.addChild(_textContainer); into the Flex Canvas.
<mx:Canvas id="canvLabel" height="80" width="100%" >
</mx:Canvas>
What I am trying to implement is to resize the Canvas automatically to fit the TextFlow. How can this be done?
How can I define the height of the TextFlow that was put into my Canvas and automatically detect the correct height for the Canvas?
If I set the Canvas height to 100% nothing is showed. I guess in Gumbo the Container is automatically resized due to TextFlow's height but how this can be implemented in Flex 3.5 ?
Thanks in advance,
Mikhail Shevchuk
Well, I can build a textcontainer as a UIComponent, but how can I detect width and height of the TextFlow so I can set appropriate size in measure() method of that UIComponent.
I guess this code should be implemented then in createChildren():
_textFlow.flowComposer.addController(new ContainerController(_textContainer, canvLabel.width, canvLabel.height));
_textContainer will be replaced with 'this', canvLabel.width with this.width, canvLabel.height with height, but how I set the correct size in this UIComponent?
Thanks in advance,
Mikhail
North America
Europe, Middle East and Africa
Asia Pacific