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>

  • 相关阅读:
    sql 查询当前数据库所有表格以及所有表格数据条数
    MVC AjaxOptions 中的OnSuccess方法执行多次的问题
    已知当前地理位置经纬度查询几个点中最近的一个地点demo
    微信分享ios设备没有分享图标安卓有分享图标 (分享功能没有问题)
    摇一摇js 实现
    linq 的switch实现
    启动服务器脚本
    关于网站的优化
    Ubuntu纯命令行安装并配置Teamviewer
    在Jupyter中使用自定义conda环境
  • 原文地址:https://www.cnblogs.com/taobataoma/p/1034755.html
Copyright © 2011-2022 走看看