flex中form表单中子元素之间的距离控制

<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:mx="library://ns.adobe.com/flex/mx"
    xmlns:s="library://ns.adobe.com/flex/spark">
    
    <s:Form id="myForm" width="350" height="325">
        <!-- Reduce gap between form items. -->
        <s:layout>
            <s:FormLayout gap="-14"/>
        </s:layout>         
        <s:Label fontSize="16" text="My Spark Form"/>
        <s:FormItem label="Address" sequenceLabel="1.">
            <s:TextInput width="100%"/>
            <s:TextInput width="100%"/>
            <s:TextInput width="100%"/>
        </s:FormItem>
        <s:FormItem label="City" sequenceLabel="2.">
            <s:TextInput width="100%"/>
        </s:FormItem>
        <s:FormItem label="State" sequenceLabel="3.">
            <s:TextInput width="100%"/>
        </s:FormItem>
        <s:FormItem label="ZipCode" sequenceLabel="4.">
            <s:TextInput width="100%"/>
        </s:FormItem>
    </s:Form> 
</s:Application>

通过在form中的layout 控制。

posted @ 2013-09-22 11:21  ywl01  阅读(960)  评论(0编辑  收藏  举报