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>

  • 相关阅读:
    Win7系统中打开exe 无反应
    IE 浏览器主页劫持 如何修复
    win10 airpods显示已配对,但就是连不上怎么办?
    tp5 layui 渲染 时间戳转换为日期时间格式
    为什么要设置 繁琐的密码
    美食摄影 – 明确目的
    MsMpEng.exe进程停止删除或弹出设备,导致移动硬盘无法正常弹出,怎么办?
    单抗热门靶点 | VEGF | TNF-α | CD20 | HER2 | PD-1 | IL-6R | CD47
    EZH2 | Ezh2 | 组蛋白甲基化酶/组蛋白甲基转移酶
    宇宙微波背景辐射 | 著名实验
  • 原文地址:https://www.cnblogs.com/taobataoma/p/1034746.html
Copyright © 2011-2022 走看看