2 Replies Latest reply on Oct 9, 2009 7:13 AM by FALCONSEYE_

    Form Item Alignment Problem

    FALCONSEYE_

      I have the following:

       

       

      CODE

      <mx:FormItem label="Fixed Total Charge:"  width="100%">
                           <mx:TextInput id="fixedChg"  width="50%" />
                   </mx:FormItem>   
                     
                  <mx:FormItem width="100%" direction="horizontal" horizontalAlign="left">
                      <mx:FormItem label="Per">
                            <mx:TextInput id="perUnit" />
                      </mx:FormItem>     
                      <mx:FormItem label="Fixed Per Unit Charge">
                             <mx:TextInput id="perUnitChg" />
                      </mx:FormItem>
                  </mx:FormItem> 


      This will put "Per" under "Fixed total charge" text input. How can I align this so that "Per" will be under "Fixed Total Charge" instead of the textbox?
      thanks in advance.

        • 1. Re: Form Item Alignment Problem
          rgadiparthi Level 2

          try this, is it the way you want???

           

              <mx:Form>
                  <mx:FormItem label="Fixed Total Charge:" width="100%">
                      <mx:TextInput id="fixedChg" width="50%"/>
                  </mx:FormItem>

           

                  <mx:FormItem direction="horizontal" label="Per" width="100%">
                      <mx:TextInput id="perUnit"/>
                      <mx:FormItem label="Fixed Per Unit Charge">
                          <mx:TextInput id="perUnitChg"/>
                      </mx:FormItem>
                  </mx:FormItem>
              </mx:Form>

          • 2. Re: Form Item Alignment Problem
            FALCONSEYE_ Level 1

            Yes, I ended up doing this:

             

            <mx:FormItem width="100%" direction="horizontal">
                            <mx:FormItem label="Per" paddingLeft="-39" width="30%">
                                  <mx:TextInput id="perUnit" width="30%"/>
                            </mx:FormItem>     
                            <mx:FormItem label="Fixed Per Unit Charge" width="35%" paddingLeft="-87">
                                   <mx:TextInput id="perUnitChg" width="35%"/>
                            </mx:FormItem>
            </mx:FormItem>

             

             

            Which one do you think is a better solution from coding standards point of view?