Просмотр полной версии : как кодом менять параметры текстового поля?
lexneter
05.04.2004, 13:05
Имеется:
s = new String('text_texte');
_root.createTextField("mytext", 5, 50, 50, 200, 100);
Как изменить шрифт,цвет,размер,наклон, жирность и т.п
. с помошью кода?
muTf = new TextFormat;
параметры :
TextFormat.align
TextFormat.blockIndent
TextFormat.bold
TextFormat.bullet
TextFormat.color
TextFormat.font
TextFormat.indent
TextFormat.italic
TextFormat.leading
TextFormat.leftMargin
TextFormat.rightMargin
TextFormat.size
TextFormat.tabStops
TextFormat.target
TextFormat.underline
TextFormat.url
можно задавать при инициализации:
new TextFormat([font, [size, [color, [bold, [italic, [underline, [url, [target, [align, [leftMargin, [rightMargin, [indent, [leading]]]]]]]]]]]]])
Parameters
да, и не забудь применить новый формат к тестовому полю:
TexField.setTextFormat(tf);
Работает на vBulletin ® версия 3.7.3. Copyright ©2000-2026, Jelsoft Enterprises Ltd. Перевод: zCarot
Copyright © 1999-2008 Flasher.ru. All rights reserved.