首页» FLEX »FLEX例子之富文本编辑器(RichTextEditor)

FLEX例子之富文本编辑器(RichTextEditor)

立即注册PayPal并开始接受信用卡付款。
转载请保持文章完整性!
本文链接地址:http://blog.desizen.com/4lone/305.html
主页:joel's blog

这个例子进行的是UI Controls:Data Entry Controls:
简介:
The control lets users enter and format text. The text characteristics that users can vary include the font family, color, size, and style, and other properties such as text alignment, bullets and URL links.
例子:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="top"
    horizontalAlign="center" backgroundGradientColors="[0x000000,0x323232]" paddingTop="0" viewSourceURL="srcview/index.html">
    <!--这个例子是一个简单的富文本编辑器,标题应用了style样式-->
    <mx:Script>
        <![CDATA[
        	//是不是在同一文件内就可访问private声明的变量?
            private var richText:String = "Enter text into the <b>RichTextEditor control</b>, then click a <b><font color='#0050AA'>button</font></b> to display your text as <i>plain text</i>, or as <i>HTML-formatted</i> text.";
        ]]>
    </mx:Script>
    <mx:Style>
        .white{
            color: #ffffff;
            fontWeight: bold;
        }
    </mx:Style>
 
    <mx:RichTextEditor titleStyleName="white" id="rte" title="RichTextEditor" width="70%" height="150"
        borderAlpha="0.15" creationComplete="rte.htmlText=richText;"  />
 
    <mx:TextArea id="rteText" width="70%" height="50" />
 
    <mx:HBox>
        <mx:Button color="black" label="Show Plain Text" click="rteText.text=rte.text;"/><!--添加动作-->
        <mx:Button color="black" label="Show HTML Markup" click="rteText.text=rte.htmlText;"/>
    </mx:HBox>
</mx:Application>

标签:, , ,

与"FLEX例子之富文本编辑器(RichTextEditor)"相关的文章:

没有评论 »

还没有评论呢。

留下评论

emoticons

Feedback Form