首页» FLEX »FLEX例子之文本(Text)文本域(TextArea)和文本输入框(TextInput)

FLEX例子之文本(Text)文本域(TextArea)和文本输入框(TextInput)

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

这个例子进行的是UI Controls:Data Entry Controls: and
因为这三个例子都没有什么特别的地方,所以就放在了一起.
简介:
The control displays multiline, noneditable . Use the Label control if you need only a single line of . The control does not support scroll bars. If you need scrolling, you should use a non-editable control. You can format the in a control using HTML tags, which are applied after the control’s CSS styles are applied. You can also put padding around the four sides of the .

The control is a multiline field with a border and optional scroll bars. The control supports the HTML rendering capabilities of Flash Player and AIR.

The control is a single-line field that is optionally editable. All in this control must use the same styling unless it is HTML . The control supports the HTML rendering capabilities of Flash Player and AIR.

例子:

<?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">
    <!--Text例子-->
    <mx:Panel title="Text Control" layout="vertical" color="0xffffff" borderAlpha="0.15" width="500"
         paddingTop="10" paddingRight="10" paddingBottom="10" paddingLeft="10" horizontalAlign="center">
 
         <mx:Text width="100%" color="0x323232">
            <mx:text>
                This is a multiline, non-editable text component. 
                If you need an editable multiline component, use TextArea.
            </mx:text>
        </mx:Text>
        <mx:HRule width="100%" /><!--横向分割线-->
        <mx:Text width="100%" color="0x323232">
            <mx:htmlText>
                <![CDATA[This is <font color="#EE1122">HTML text</font> in a <b>Text component</b>. Using the <u>htmlText attribute</u> of the <font color="#22A050">Text component</font> you can use basic HTML markup.]]>
            </mx:htmlText>
        </mx:Text>
 
    </mx:Panel>
</mx:Application>
<?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">
 
    <mx:Panel title="TextArea Control" layout="vertical" color="0xffffff" borderAlpha="0.15"
         paddingTop="10" paddingRight="10" paddingBottom="10" paddingLeft="10" horizontalAlign="center">
 
         <mx:TextArea width="400" height="60" color="0x323232">
            <mx:text>
                This is a multiline, editable TextArea control. If you need 
                a non-editable multiline control, use the Text control.
            </mx:text>
        </mx:TextArea>
 
        <mx:TextArea width="400" height="60" color="0x323232">
            <mx:htmlText><![CDATA[This is <font color="#EE1122">HTML text</font> in a <b>TextArea control</b>. Use the <u>htmlText property</u> of the <font color="#22A050">TextArea control</font> to include basic HTML markup in your text.]]></mx:htmlText>
        </mx:TextArea>
 
    </mx:Panel>
</mx:Application>
<?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">
 
    <mx:Panel title="TextInput Control" layout="vertical" color="0xffffff" borderAlpha="0.15"
         paddingTop="10" paddingRight="10" paddingBottom="10" paddingLeft="10" horizontalAlign="center">
 
         <mx:TextInput id="src" text="Hello World!" color="0x323232"/>
 
        <mx:Button label="Copy Text" click="dest.text = src.text" color="0x323232"/>
 
        <mx:TextInput id="dest" color="0x323232"/>
 
    </mx:Panel>
</mx:Application>

标签:, , , , ,

与"FLEX例子之文本(Text)文本域(TextArea)和文本输入框(TextInput)"相关的文章:

评论暂缺 »

还没有任何评论。

留下评论

emoticons

Feedback Form