zoukankan      html  css  js  c++  java
  • Styling the Alert control’s status message

    The following example shows how you can customize the appearance of the status message in an Alert control in Flex by setting the statusStyleName style and status property
    <?xml version="1.0" encoding="utf-8"?>
    <!-- http://blog.flexexamples.com/2008/01/03/styling-the-alert-controls-status-message/ -->
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
            layout
    ="vertical"
            verticalAlign
    ="middle"
            backgroundColor
    ="white"
            creationComplete
    ="init();">

        
    <mx:Style>
            @font-face {
                src: local("Comic Sans MS");
                fontFamily: myComicSansMS;
                fontWeight: normal;
            }

            Alert {
                statusStyleName: myCustomStatusStyleName;
            }

            .myCustomStatusStyleName {
                color: red;
                fontFamily: myComicSansMS;
                fontSize: 10;
                fontWeight: normal;
            }
        
    </mx:Style>

        
    <mx:Script>
            
    <![CDATA[
                import mx.controls.Alert;

                private var alert:Alert;

                private function init():void {
                    var myMessage:String = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit.\nDonec tincidunt sollicitudin sem.";
                    var myTitle:String = "The quick brown fox jumped over the lazy dog";
                    alert = Alert.show(myMessage, myTitle);
                    alert.status = "status message";
                }
            
    ]]>
        
    </mx:Script>

        
    <mx:ApplicationControlBar dock="true">
            
    <mx:Button label="Launch alert" click="init();" />
        
    </mx:ApplicationControlBar>

    </mx:Application>

  • 相关阅读:
    linux 如何使用密钥登录 (CentOs)
    linux修改ssh端口 以及禁止root远程登录 (实验机 CentOs)
    查看Windows端口及端口关闭方法
    使用 Linux 终端 SSH 登录 VPS
    修改Chrome默认搜索引擎为Google.com
    Windows 小技巧: 變更輸入法順序
    CentOS 安装BitTorrent Sync详细步骤
    Android手机部分名词浅谈
    PPTP模式跟L2TP模式有什么不同
    .CO域名快被这帮搞IT的玩坏了……
  • 原文地址:https://www.cnblogs.com/taobataoma/p/1034718.html
Copyright © 2011-2022 走看看