zoukankan      html  css  js  c++  java
  • flex mx组件和s组件的字体兼容性不一致

    <?xml version="1.0" encoding="utf-8"?>  
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"   
                   xmlns:s="library://ns.adobe.com/flex/spark"   
                   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">  
        
        
        <fx:Script>  
            <![CDATA[ 
                protected function button1_clickHandler(event:MouseEvent):void 
                { 
                    // TODO Auto-generated method stub 
                    this.lbText.setStyle("fontFamily", "SimSun"); 
                    this.lbText1.setStyle("fontFamily", "SimSun"); 
                } 
                
                protected function button2_clickHandler(event:MouseEvent):void 
                { 
                    // TODO Auto-generated method stub 
                    this.lbText.setStyle("fontFamily", "SimHei"); 
                    this.lbText.setStyle("fontFamily", "SimHei"); 
                } 
                
                
                protected function button3_clickHandler(event:MouseEvent):void 
                { 
                    // TODO Auto-generated method stub 
                    this.lbText.setStyle("fontFamily", "FangSong_GB2312"); 
                    this.lbText1.setStyle("fontFamily", "FangSong_GB2312"); 
                } 
                
                
                protected function button4_clickHandler(event:MouseEvent):void 
                { 
                    // TODO Auto-generated method stub 
                    this.lbText.setStyle("fontFamily", "KaiTi_GB2312"); 
                    this.lbText1.setStyle("fontFamily", "KaiTi_GB2312"); 
                } 
                protected function button5_clickHandler(event:MouseEvent):void 
                { 
                    // TODO Auto-generated method stub 
                    this.lbText.setStyle("fontFamily", "微软雅黑"); 
                    this.lbText1.setStyle("fontFamily", "微软雅黑"); 
                } 
                
            ]]>  
        </fx:Script>  
        
        <fx:Declarations>  
            <!-- 将非可视元素(例如服务、值对象)放在此处 -->  
        </fx:Declarations>  
        <mx:Label id="lbText" x="96" y="67" text="mx:大同市朔州市忻州市太原市-----良   轻度污染" 
                         fontSize="14" />  
        <s:Label id="lbText1" x="96" y="100" text="s:大同市朔州市忻州市太原市-----良   轻度污染" 
                   fontSize="14" />  
        <s:Button  x="4" y="3" label="宋体" click="button1_clickHandler(event)" />  
        <s:Button  x="82" y="3" label="黑体" click="button2_clickHandler(event)"/>  
        <s:Button  x="167" y="3" label="仿宋" click="button3_clickHandler(event)"/>  
        <s:Button  x="245" y="3" label="楷体" click="button4_clickHandler(event)"/>  
        <s:Button  x="350" y="3" label="微软雅黑" click="button5_clickHandler(event)"/>  
    </s:Application>  
  • 相关阅读:
    php与WebservicesNuSOAP的使用说明(转载)
    获取cpu序列号,硬盘ID,网卡MAC地址(转载)
    system.net.sockets.tcplistener
    用VS2005实现软件多语言版本的迅捷开发(转载)
    洛谷P1776 宝物筛选 题解 多重背包
    2013 ACMICPC亚洲区域赛南京站C题 题解 轮廓线DP
    2017 ACMICPC亚洲区域赛北京站J题 Pangu and Stones 题解 区间DP
    洛谷P1385 密令 题解 动态规划
    洛谷P1028 数的计算 题解 动态规划入门题
    洛谷P1029 最大公约数和最小公倍数问题 题解
  • 原文地址:https://www.cnblogs.com/tiandi/p/5164300.html
Copyright © 2011-2022 走看看