开发者

Flex FormItem alignment

I wanted to know if there's a way to put the label of the FormItem tag right . I mean , by default the FormItem label and the TextInput look like this : "Name: [textinput] "

but I want my form to look like this :开发者_开发技巧 "[textinput] :Name" . I tried many properties and attributes but seems there's no property for doing that . can anyone help me with this? thanks


Use Flex 4.5 SDK

<?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">
    <s:Form layoutDirection="rtl">
        <s:FormItem label="First item">
            <s:TextInput>

            </s:TextInput> 
        </s:FormItem>
    </s:Form>
</s:Application>


Instead of using FormItem, we can use HBox but we need to mention Label explicitly

    <mx:HBox>
    <mx:TextInput id="text"/>
    <mx:Label text="Text Input"/>
    </mx:HBox>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜