1 Reply Latest reply on Apr 30, 2008 3:29 AM by Schdeffan

    AIR/Flex: Displaying Tabulators in TextArea

    Schdeffan Level 1

      there seems to be a problem with the displaying of tabulators in the TextArea Control. It seems as if the position of the tabulators is always calculated for the whole application window no matter in what other containers the TextArea control might be.

      Here's some example code to reproduce the effect:

      <?xml version="1.0" encoding="utf-8"?>
      <mx:WindowedApplication xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute">

      import mx.controls.TextArea;
      private function fill(ev:Event):void
      var tA:TextArea = ev.currentTarget as TextArea;
      var t:String = "";

      for (var i:int = 0; i < 10; i++)
      t = t + "\tThere's a TAB\r";
      tA.text = t;

      <mx:HDividedBox left="0" top="0" right="0" bottom="0">
      <mx:TextArea height="100%" width="100%" creationComplete="fill(event)"/>
      <mx:TextArea height="100%" width="100%" creationComplete="fill(event)"/>


      If you change the width the applicaiton window you can see how the width of the tabulators in the right TextArea changes.

      Is there any way to prevent this behaviour?