小小菜鸟的web菜园子

web开发学习。好记性不如烂笔头。每天进步一点点!

导航

在ComboBox控件中使用嵌入字体。

ComboBox控件的fontFamily样式学习。
示例:


<?xml version="1.0" encoding="utf-8"?>
<!-- http://blog.flexexamples.com/2008/06/02/using-an-embedded-font-with-the-combobox-control-in-flex/ -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout
="vertical"
        verticalAlign
="top"
        backgroundColor
="white">

    
<mx:Style>
        @font-face {
            src: local("Base 02");
            fontFamily: EmbeddedBase02;
            fontWeight: bold;
        }

        @font-face {
            src: local("Base 02");
            fontFamily: EmbeddedBase02;
        }
    
</mx:Style>

    
<mx:Array id="arr">
        
<mx:Object label="One" />
        
<mx:Object label="Two" />
        
<mx:Object label="Three" />
        
<mx:Object label="Four" />
        
<mx:Object label="Five" />
    
</mx:Array>

    
<mx:ComboBox id="comboBox"
            dataProvider
="{arr}"
            fontFamily
="EmbeddedBase02" />

</mx:Application>

源文件:http://blog.flexexamples.com/wp-content/uploads/ComboBox_fontFamily_test/bin/srcview/index.html

来自:http://blog.flexexamples.com/2008/06/02/using-an-embedded-font-with-the-combobox-control-in-flex/

posted on 2008-06-04 13:40  『小小菜鸟』  阅读(494)  评论(0编辑  收藏  举报