![]() ![]() | |
Flash Player 6。
my_txt.autoSize
属性;控制文本字段的自动大小调整和对齐。autoSize 可接受的值是 "none"(默认值)、"left"、"right" 和 "center"。设置 autoSize 属性时,true 与 "left" 同义,而 false 与 "none" 同义。
autoSize、multiline 和 wordWrap 的值确定文本字段是否扩展或收缩到左边、右边或底边。您可以使用以下代码并为 autoSize、multiline 和 wordWrap 输入不同的值,观察当这些值更改时字段如何调整大小。
createTextField("my_txt", 1, 0, 0, 200, 20);
with (my_txt) {
border = true;
borderColor = 0x000000;
multiline = false;
wordWrap = false;
autoSize = "none";
text = "Here is a whole bunch of text that won't fit in the field ";
}
下面的语句将文本字段 my_txt 的 autosize 属性设置为 "center"。
my_txt.autosize = "center";
![]() ![]() | |