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

    The following example shows how you can customize the appearance of the message text in an Alert control in Flex by setting the messageStyleName style
    <?xml version="1.0" encoding="utf-8"?>
    <!-- http://blog.flexexamples.com/2008/01/03/styling-the-alert-controls-message-text/ -->
    <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;
            }

            @font-face {
                src: local("Comic Sans MS");
                fontFamily: myComicSansMS;
                fontWeight: bold;
            }

            Alert {
                messageStyleName: myCustomMessageStyleName;
            }

            .myCustomMessageStyleName {
                color: haloOrange;
                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);
                }
            
    ]]>
        
    </mx:Script>

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

    </mx:Application>

  • 相关阅读:
    python 的csr_python
    OpenBLAS学习一:源码架构解析&GEMM分析
    gcc警告选项汇总
    Welcome! This is the documentation for Python 3.6.8
    CentOS 7 查看和设置防火墙状态
    django中多个app放入同一文件apps
    安装mysqlclient, 链接mysql失败,提示“Library not loaded: @rpath/libmysqlclient.21.dylib”
    动手玩转Docker(二)
    动手玩转Docker(一)
    转载:微服务部署:蓝绿部署、滚动部署、灰度发布、金丝雀发布
  • 原文地址:https://www.cnblogs.com/taobataoma/p/1034746.html
Copyright © 2011-2022 走看看