zoukankan      html  css  js  c++  java
  • Styling the Alert control’s title bar

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

            .myCustomTitleStyleName {
                color: haloOrange;
                fontFamily: myComicSansMS;
                fontSize: 16;
                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>

  • 相关阅读:
    BZOJ 1016 最小生成树计数(矩阵树定理)
    sdoi2013 spring(hash+容斥)
    51nod 1301 集合异或和(DP)
    51nod 1576 Tree and permutation(树的重心+dfn序)
    BZOJ 4145 [AMPPZ2014]The Prices (状压DP)
    BZOJ 2260 商店购物(最小树形图)
    BZOJ 4006 [JLOI2015]管道连接(斯坦纳树+子集DP)
    BZOJ 2595 [Wc2008]游览计划(斯坦纳树)
    BZOJ 5180 [Baltic2016]Cities(斯坦纳树)
    51nod 1392 装盒子(费用流)
  • 原文地址:https://www.cnblogs.com/taobataoma/p/1034755.html
Copyright © 2011-2022 走看看