一直以为TextField不能设置背景色。其实可以。需要额外设定开关属性background。开启背景色以后,文本就不透明了。因为被背景色挡住了。默认是白色。
var tf:TextField = new TextField();
tf.background = true;
tf.backgroundColor = 0xed6a00;
一直以为TextField不能设置背景色。其实可以。需要额外设定开关属性background。开启背景色以后,文本就不透明了。因为被背景色挡住了。默认是白色。
var tf:TextField = new TextField();
tf.background = true;
tf.backgroundColor = 0xed6a00;