Flex中如何通过selectedButtonTextStyleName样式,设置ToggleButtonBar选中按钮文本颜色

main.mxml

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <mx:Applicationname="ToggleButtonBar_selectedButtonTextStyleName_test"
  3. xmlns:mx="http://www.adobe.com/2006/mxml"
  4. layout="vertical"
  5. verticalAlign="middle"
  6. backgroundColor="white">
  7. <mx:Style>
  8. .mySelectedButtonTextStyleName {
  9. color: haloBlue;
  10. }
  11. </mx:Style>
  12. <mx:Arrayid="arr">
  13. <mx:Objectlabel="One Fish" />
  14. <mx:Objectlabel="Two Fish" />
  15. <mx:Objectlabel="Red Fish" />
  16. <mx:Objectlabel="Blue Fish" />
  17. </mx:Array>
  18. <mx:ToggleButtonBarid="toggleButtonBar"
  19. selectedButtonTextStyleName="mySelectedButtonTextStyleName"
  20. dataProvider="{arr}"/>
  21. </mx:Application>

你可能感兴趣的:(xml,Flex,Adobe)