开发者

Change font size or theme across entire application - Adobe Flex / AIR

开发者 https://www.devze.com 2023-02-23 06:16 出处:网络
I am creating an Adobe Flex application for the Blackberry Playbook. I was wondering if there is a way where the开发者_C百科 user can click a button (for example) to increase or decrease all font size

I am creating an Adobe Flex application for the Blackberry Playbook. I was wondering if there is a way where the开发者_C百科 user can click a button (for example) to increase or decrease all font sizes across the entire application?

Also a similar button to change the entire theme would be most useful! Is it possible?

Thanks Phil


You can change dynamically styles as if you were changing it in your CSS:

var selector:CSSStyleDeclaration = FlexGlobals.topLevelApplication.styleManager.getStyleDeclaration("global");
selector.setStyle("fontSize", 8);
FlexGlobals.topLevelApplication.styleManager.setStyleDeclaration("global", selector, true);
0

精彩评论

暂无评论...
验证码 换一张
取 消