如何更改 Flex 4 Radiobutton 选定的 fontWeight
我已经四处寻找了一段时间,但找不到任何东西。在 Flex 中,我需要能够将选定的 RadioButton 的 fontWeight 更改为粗体。因此,当选择 RadioButton 时,它会调用 AS3 中的一个函数来设置所选 RadioButton 的 fontWeight...
valveRadioGroup.addEventListener(Event.CHANGE, changeRadioHandler);
private function changeRadioHandler(event:Event):void {
//change this RadioButton's fontWeight to bold
}
当未选择它时,它还需要恢复到正常的 fontWeight。有谁知道这是否可能?谢谢!
I have been searching around for a while now, and cant find anything. In Flex, I need to be able to change the fontWeight of a RadioButton that is selected to bold. So, when a RadioButton is selected, it would call a function in AS3 that would set the fontWeight of that selected RadioButton...
valveRadioGroup.addEventListener(Event.CHANGE, changeRadioHandler);
private function changeRadioHandler(event:Event):void {
//change this RadioButton's fontWeight to bold
}
It would also need to revert back to its normal fontWeight when it is not selected. Does anyone know if this is possible? Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
只需实现您自己的
RadioButtonSkin
(复制现有的)并更改其中的Label
声明:您可以使用 CSS 或直接使用
skinClass
属性。Just implement your own
RadioButtonSkin
(make a copy of existing one) and changeLabel
declaration there:You can apply this skin using CSS or directly with
skinClass
attribute.