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>

  • 相关阅读:
    PHP伪造referer访问地址
    第一个伪静态(url重写)测试
    url重写(伪静态)IIS配置图解
    两个DropDownList数据绑定联动(数据库)
    PlaceHolder
    Page之IsPostBack属性
    确定删除吗?
    很喜欢的一个组合 因为他们的音乐改变了我对许多事物的看法SAVAGE GARDEN
    DragonBones 骨骼动画引擎
    关于Flash的Sockt通信与跨域文件
  • 原文地址:https://www.cnblogs.com/taobataoma/p/1034755.html
Copyright © 2011-2022 走看看