`
china34420
  • 浏览: 133592 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论

FLASH组件中List/ComboBox/DataGrid文本样式设置

阅读更多
在FLASH中我们可以使用setStyle来设置组件的样式..
可对于像List/ComboBox/DataGrid这类数据显示类的组件...
使用
setStyle("textFormat",textFormat)
并不会设置其中的数据区域的文本样式..
那是因为这类组件..显示数据部份为CellRenderer..
而对组件setStyle并不会影响到CellRenderer..
我们应当调用setRendererStyle方法来另外对CellRenderer进行设置
list.setRendererStyle("textFormat",new TextFormat("宋体",14,0xFF6600));

另外..如果想像Flex那样达到全局样式设置的效果..
可以使用StyleManager类..该类在fl.managers中..
只要使用
import fl.managers.StyleManager;
StyleManager.setStyle("textFormat",new TextFormat("宋体",12,0x000000));
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics