1 Reply Latest reply on Apr 15, 2011 12:31 PM by Flex harUI

    TextFlow into multiple RichEditableText containers keeping container styles

    mendozm

      I'm stumped.

       

      Can anyone help me to flow text into multiple RichEditableText contianers with different styles applied to each container?  When I use the following code, it works for flowing text between the containers but it does not adopt the styles of the RichEditableText objects that I attach.

       

      var textFlow:TextFlow;

      textFlow = TextConverter.importToFlow("one two three four five six seven eight nine ten eleven twelve thirteen", TextConverter.PLAIN_TEXT_FORMAT);

      textFlow.flowComposer.addController(new ContainerController(richTextEditor1, richTextEditor1.width, richTextEditor1.height));

      textFlow.flowComposer.addController(new ContainerController(richTextEditor2, richTextEditor2.width, richTextEditor2.height));

      textFlow.flowComposer.updateAllControllers();

       

      I have tried to apply styles directly to the ContainerControllers with no success.  I can apply a style to the TextFlow but it uses that style for the all containers where the text is flowing into.

       

      If I attach the textFlow object directly to the textFlow property in the RichEditableText object, it will keep the formatting of the RichEditableText.  But then I can't figure out how to make it flow to the next text box.

       

      I even tried adding the additional controller (attached to the second RichEditableText) to the TextFlow after attaching it to the first RichEditableText object.  No luck.

       

      I hope this is a stupid qustion and there is a simple answer.  Any help is appreciated.

       

      Thank you!

       

      Mike