You do not have to make a separate label tag for your form items.  In
addition, FormItem can be styled using labelStyleName.  Your TextInput is
styled as normal.

<mx:FormItem direction="horizontal"
             label="Style"
             horizontalAlign="left">
     <mx:TextInput id="style"
                   text="{pricelist.style}"
                   change="{pricelist.style=style.text}"
                   width="100%"
     />
</mx:FormItem>

http://livedocs.adobe.com/flex/3/langref/index.html


Charles P.



On Mon, May 11, 2009 at 9:07 AM, markgoldin_2000
<[email protected]>wrote:

> Sure. Here:
>
> <mx:Form width="60%" id="listterms" horizontalGap="1">
>                        <mx:FormItem direction="horizontal">
>                       <mx:Label text="Style" color="#000000"/>
>                        <mx:TextInput id="style"
>                                text="{pricelist.style}"
>                                change="{pricelist.style=style.text}"
>                                width="100%"/>
>                    </mx:FormItem>
>                    <mx:FormItem direction="horizontal">
>                       <mx:Label text="Fabric" color="#000000"/>
>                        <mx:TextInput id="fabric"
>                                text="{pricelist.fabric}"
>                                change="{pricelist.fabric=fabric.text}"
>                                width="100%"/>
>                    </mx:FormItem>
>                    <mx:FormItem width="100%" direction="horizontal">
>                       <mx:Label text="Edge" color="#000000"/>
>                        <mx:TextInput id="edge"
>                                text="{pricelist.edge}"
>                                change="{pricelist.edge=edge.text}"
>                                width="100%"/>
>                    </mx:FormItem>
>                    <mx:FormItem width="100%" direction="horizontal">
>                       <mx:Label text="Design" color="#000000"/>
>                        <mx:TextInput id="design"
>                                text="{pricelist.design}"
>                                change="{pricelist.design=design.text}"
>                                width="100%"/>
>                    </mx:FormItem>
>                    <mx:FormItem width="100%" direction="horizontal">
>                       <mx:Label text="Fill" color="#000000"/>
>                        <mx:TextInput id="fill"
>                                text="{pricelist.fill}"
>                                change="{pricelist.fill=fill.text}"
>                                width="100%"/>
>                    </mx:FormItem>
>                    <mx:FormItem width="100%" direction="horizontal">
>                       <mx:Label text="Hypo-Allergenic" color="#000000"/>
>                        <mx:TextInput id="hypo"
>                                text="{pricelist.hypo}"
>                                change="{pricelist.hypo=hypo.text}"
>                                width="100%"/>
>                    </mx:FormItem>
>                    <mx:FormItem width="100%" direction="horizontal">
>                       <mx:Label text="Care" color="#000000"/>
>                        <mx:TextInput id="care"
>                                text="{pricelist.care}"
>                                change="{pricelist.care=care.text}"
>                                width="100%"/>
>                    </mx:FormItem>
>                    <mx:FormItem width="100%" direction="horizontal">
>                       <mx:Label text="Packaging" color="#000000"/>
>                        <mx:TextInput id="packaging"
>                                text="{pricelist.packaging}"
>
>  change="{pricelist.packaging=packaging.text}"
>                                width="100%"/>
>                    </mx:FormItem>
>                    <mx:FormItem width="100%" direction="horizontal">
>                       <mx:Label text="Warranty" color="#000000"/>
>                        <mx:TextInput id="warranty"
>                                text="{pricelist.warranty}"
>                                change="{pricelist.warranty=warranty.text}"
>                                width="100%"/>
>                    </mx:FormItem>
>                    <mx:FormItem width="100%" direction="horizontal">
>                       <mx:Label text="Colors" color="#000000"/>
>                        <mx:TextInput id="colors"
>                                text="{pricelist.colors}"
>                                change="{pricelist.colors=colors.text}"
>                                width="100%"/>
>                    </mx:FormItem>
>                    <mx:FormItem width="100%" direction="horizontal">
>                       <mx:Label text="Features" color="#000000"/>
>                        <mx:TextInput id="features"
>                                text="{pricelist.features}"
>                                change="{pricelist.features=features.text}"
>                                width="100%"/>
>                    </mx:FormItem>
>                </mx:Form>
>
>
> --- In [email protected], "valdhor" <valdhorli...@...> wrote:
> >
> > Can you show some code?
> >
> >
> >
> > --- In [email protected], "markgoldin_2000" <markgoldin_2000@>
> wrote:
> > >
> > > Somehow labels in my form are all left aligned, while according to
> this:
> > >
> > > Aligning and spacing Form container children
> > >
> > > All Form container labels are right-aligned, and all children are
> left-aligned in the container. You cannot override this alignment
> > >
> > > it should be right-aligned.
>

Reply via email to