Set tabStops : tab « TextField « Flash / Flex / ActionScript






Set tabStops

 


package{
  import flash.display.Sprite;
      import flash.text.*; 
  public class Main extends Sprite{
    public function Main(){
        var tContent:TextField = new TextField();tContent.multiline = true;
        tContent.border = true;
        tContent.wordWrap = true;
        tContent.text = "\ta\n";
        tContent.text += "\t\tb\n";
        tContent.text += "\t\t\tc";
        var tfFormatter:TextFormat = new TextFormat();
        tfFormatter.tabStops = [10, 50, 150];
        tfFormatter.align = "left";
        tContent.setTextFormat(tfFormatter);
          addChild(tContent);

    }
  }
}

        








Related examples in the same category

1.Working with Tab Order