Flash / Flex / ActionScript/TextField/tab
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);
}
}
}
Working with Tab Order
package{
import flash.display.Sprite;
import flash.text.*;
public class Main extends Sprite{
public function Main(){
var tEmail:TextField = new TextField();
tEmail.border = true;
tEmail.type = "input";
tEmail.tabIndex = 1;
var tPostalCode:TextField = new TextField();
tPostalCode.border = true;
tPostalCode.type = "input";
tPostalCode.tabIndex = 2;
addChild(tEmail);
addChild(tPostalCode);
}
}
}