Flash CS3 Documentation |
|||
| ActionScript 2.0 Language Reference > ActionScript classes > TextFormat > tabStops (TextFormat.tabStops property) | |||
public tabStops : Array
Specifies custom tab stops as an array of non-negative integers. Each tab stop is specified in pixels. If custom tab stops are not specified (null), the default tab stop is 4 (average character width).
Availability: ActionScript 1.0; Flash Player 6
The following example creates two text fields, one with tab stops every 40 pixels, and the other with tab stops every 75 pixels.
this.createTextField("mytext",1,100,100,400,100);
mytext.border = true;
var myformat:TextFormat = new TextFormat();
myformat.tabStops = [40,80,120,160];
mytext.text = "A\tB\tC\tD"; // \t is the tab stop character
mytext.setTextFormat(myformat);
this.createTextField("mytext2",2,100,220,400,100);
mytext2.border = true;
var myformat2:TextFormat = new TextFormat();
myformat2.tabStops = [75,150,225,300];
mytext2.text ="A\tB\tC\tD";
mytext2.setTextFormat(myformat2);
Flash CS3