`
xiaoer_1982
  • 浏览: 1806761 次
  • 性别: Icon_minigender_2
  • 来自: 北京
文章分类
社区版块
存档分类
最新评论

Flex中自定义Alert控件按钮(Button)样式的例子

阅读更多

下面是完整代码(或点击这里察看):

Download: main.mxml
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <mx:Applicationxmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white">
  3. <mx:Style>
  4. .roundedAlertButtons {
  5. cornerRadius: 10;
  6. font-weight: bold;
  7. color: black;
  8. }
  9. </mx:Style>
  10. <mx:Script>
  11. <![CDATA[
  12. import mx.controls.Alert;
  13. private var alert:Alert;
  14. private function showAlert():void {
  15. alert = Alert.show("The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog.", "I'm an Alert control.", Alert.YES | Alert.NO);
  16. alert.setStyle("buttonStyleName", "roundedAlertButtons");
  17. }
  18. ]]>
  19. </mx:Script>
  20. <mx:Buttonlabel="Show alert" click="showAlert();" />
  21. </mx:Application>

本文转自:http://blog.minidx.com/2008/07/20/1097.html

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics