您的当前位置:首页正文

设置按钮式样文本格式

2022-06-05 来源:汇智旅游网
设置按钮式样⽂本格式

// Import the required component classes.import fl.controls.Button;

// Create a new TextFormat object which will be used for the button's label.var myTextFormat:TextFormat = new TextFormat();myTextFormat.bold = true;

myTextFormat.color = 0xFF0000;

/* Create a new Button component instance and set the textFormat style to the TextFormat object created earlier. */var myButton:Button = new Button();myButton.label = \"Click me\";myButton.move(10, 10);

myButton.setStyle(\"textFormat\", myTextFormat);addChild(myButton);

因篇幅问题不能全部显示,请点此查看更多更全内容