4 Replies Latest reply on Oct 5, 2009 12:01 PM by FALCONSEYE_

    form layout

    FALCONSEYE_

      I am kind of confused as what type of layout to pick and it's performance.  So far, I have the following:

       

      <mx:Canvas x="3" y="3" width="1018" height="750" borderStyle="solid">
          <mx:Form id="masterBillingFormulas">
              <mx:Grid>
                  <mx:GridRow>
                      <mx:GridItem colSpan="5">
                           <mx:Image source="header.jpg" width="982" height="394" x="0" y="0" scaleContent="true"/>
                      </mx:GridItem>               
                  </mx:GridRow>
                  <mx:GridRow height="40">
                  <mx:GridItem>
                     <mx:FormItem label="Property Code:">
                               <mx:ComboBox id="propertyCode" dataProvider="{qry_communites}" change="onCreationComplete()"   />
                       </mx:FormItem>
                  </mx:GridItem>
                  <mx:GridItem>
                      <mx:Spacer width="5"/>
                  </mx:GridItem>
                  <mx:GridItem>
                     <mx:FormItem label="Utility Type:">
                            <mx:ComboBox id="utilityType" dataProvider="{qry_utilityTypes}"  />
                     </mx:FormItem>   
                  </mx:GridItem>
                  <mx:GridItem>
                      <mx:Spacer width="5"/>
                  </mx:GridItem>
                  <mx:GridItem>
                    <mx:FormItem label="Active:">
                      <mx:ComboBox id="active">
                          <mx:dataProvider>
                              <mx:Array>
                                  <mx:Object label="Yes" />
                                  <mx:Object label="No" />
                              </mx:Array>
                          </mx:dataProvider>
                      </mx:ComboBox>
                    </mx:FormItem>   
                     </mx:GridItem>
                  </mx:GridRow>

           ....

      </mx:Canvas>

       

      I need to nicely align the label, the input field (combox,textbox,etc. etc.) and the buttons. Should I keep doing this or switch to something else?

      thanks in advance.

        • 1. Re: form layout
          rgadiparthi Level 2

          you can do this forms,.

          • 2. Re: form layout
            FALCONSEYE_ Level 1

            If I use:

             

            <mx:Form id="masterBillingFormulas">

            <mx:FormItem label="Property Code:">
                                     <mx:ComboBox id="propertyCode" dataProvider="{qry_communites}" change="onCreationComplete()"   />

            ...

             

             

            It displays evertything like in vbox. I need to be able to put 3-4 form items in one row. Some other rows might have 2 or even 1 form item.

            • 3. Re: form layout
              flashharry! Level 1

              You can nest form items and set the direction property
              <FormItem direction="horizontal" paddingLeft="0">
                   <FormItem label="Label1"  direction="horizontal">
                        <ComboBox id="myComboBox" />
                        <CheckBox id="myChckBox" selected="false" />
                   </FormItem>
                   <FormItem label="Label2"  direction="horizontal">
                        <TextInput id="myTextInput" />
                   </FormItem>
              </FormItem>
                           

              • 4. Re: form layout
                FALCONSEYE_ Level 1

                Thanks, I am getting closer. If only I could put the labels, text boxes, comboBoxes in a nice order.