0 Replies Latest reply on Aug 26, 2009 1:55 AM by The Bruder

    How do i restrict textFlow to single line in Flex3 (with flash 10)?

    The Bruder Level 1

      Hi All,

       

      I'm trying to create a text component that will use the new flash 10 text engile in flex 3.

       

      I created a project, imported the ilbraries, changed the sdk to the new one and used the code:

       

      private

       

       

       

       

      new UIComponent();

      _textContainer.width =

       

      function onCreationComplete():void {

      _textContainer =

       

      this.width;

      _textContainer.height =

       

      this.height;

      addChild(_textContainer);

       

       

       

      var docc:DisplayObjectContainerController = new DisplayObjectContainerController(_textContainer, this.width, this.height);

       

       

       

      var _textFlow:TextFlow;

       

      _textFlow = TextFilter.importToFlow(textInput, TextFilter.TEXT_LAYOUT_FORMAT);

       

      _textFlow.flowComposer.addController(docc);

       

       

      //adding Select/Edit/Copy/Paste/Undo features

       

       

      _textFlow.interactionManager =

       

      new EditManager(new UndoManager());

       

       

       

      // initialize with a selection before the first character

      _textFlow.interactionManager.setSelection(0,0);

       

      _textFlow.flowComposer.updateAllContainers();

      }

       

      it works great, but how do i restrict it to only one line?

       

      Thanks in advance,

      Lior