AS3:更改单选按钮中的字体
AS3: change Font in Radio button
如何更改flash professional默认组件中Radio Button中使用的字体?
要更改 RadioButton
组件标签的字体,您可以使用将应用于 RadioButton
组件的标签(TextField 对象)的 RadioButton.setStyle()
function to set the TextFormat
。
为此,您可以这样做,例如:
var text_format:TextFormat = new TextFormat();
text_format.font = 'Verdana';
text_format.color = 0xff0000;
RadioButton(radio_button).setStyle('textFormat', text_format);
您还可以使用 RadioButton.textField
属性 将其直接应用于标签,其中 return TextField 对象:
RadioButton(radio_button).textField.setTextFormat(text_format);
希望能帮到你。
如何更改flash professional默认组件中Radio Button中使用的字体?
要更改 RadioButton
组件标签的字体,您可以使用将应用于 RadioButton
组件的标签(TextField 对象)的 RadioButton.setStyle()
function to set the TextFormat
。
为此,您可以这样做,例如:
var text_format:TextFormat = new TextFormat();
text_format.font = 'Verdana';
text_format.color = 0xff0000;
RadioButton(radio_button).setStyle('textFormat', text_format);
您还可以使用 RadioButton.textField
属性 将其直接应用于标签,其中 return TextField 对象:
RadioButton(radio_button).textField.setTextFormat(text_format);
希望能帮到你。