House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  Adobe Flex

Form Item Alignment Problem

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Burak Toker
10/06/2009 01:34 PM

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.

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Paul Kukiel
10/06/2009 02:26 PM

Do you mean like this: <mx:FormItem label="Fixed Total Charge:"  width="100%">           <mx:TextInput id="fixedChg"  width="50%" />         </mx:FormItem>           <mx:FormItem label="Per" width="100%">           <mx:TextInput id="perUnit" />         </mx:FormItem>             <mx:FormItem label="Fixed Per Unit Charge" width="100%">           <mx:TextInput id="perUnitChg" />         </mx:FormItem> Paul. 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.

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Burak Toker
10/06/2009 03:50 PM

Not quite. I need to put perUnit and perUnitChg in the same line and somewhat align per to the left. When I put a background color, I see the FormItem (direction=horizontal) expands 100% but somewhat pushes the perUnit to the left. <mx:FormItem label="Fixed Total Charge:"  width="100%">              <mx:TextInput id="fixedChg"  width="50%" />           </mx:FormItem>     <mx:FormItem direction="horizontal" width="100%">   <mx:FormItem label="Per" width="20%" >             <mx:TextInput id="perUnit" width="20%"/>           </mx:FormItem>               <mx:FormItem label="Fixed Per Unit Charge">     <mx:TextInput id="perUnitChg"  width="100%"/>           </mx:FormItem>

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Paul Kukiel
10/06/2009 05:07 PM

Ahh I understand now. <mx:Style>       FormItem {         labelStyleName: labelStyle;       }       .labelStyle{         textAlign: left;       }     </mx:Style>              <mx:Form>           <mx:FormItem label="Fixed Total Charge:" >                    <mx:TextInput id="fixedChg"  />               </mx:FormItem>           <mx:FormItem label="Per" >                   <mx:TextInput id="perUnit" />                 </mx:FormItem>                     <mx:FormItem label="Fixed Per Unit Charge">           <mx:TextInput id="perUnitChg"  />                 </mx:FormItem>         </mx:Form> http://flex.gunua.com/?p=47 Paul. Not quite. I need to put perUnit and perUnitChg in the same line and somewhat align per to the left. When I put a background color, I see the FormItem (direction=horizontal) expands 100% but somewhat pushes the perUnit to the left. <mx:FormItem label="Fixed Total Charge:"  width="100%">              <mx:TextInput id="fixedChg"  width="50%" />           </mx:FormItem>     <mx:FormItem direction="horizontal" width="100%">   <mx:FormItem label="Per" width="20%" >             <mx:TextInput id="perUnit" width="20%"/>           </mx:FormItem>               <mx:FormItem label="Fixed Per Unit Charge">     <mx:TextInput id="perUnitChg"  width="100%"/>           </mx:FormItem>

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Burak Toker
10/07/2009 02:28 PM

actually, still no. <mx:Style>       FormItem {         labelStyleName: labelStyle;       }       .labelStyle{           textAlign: left;         }     </mx:Style>               <mx:Form>   <mx:FormItem label="Name">     <mx:HBox>       <mx:TextInput id="firstName1" />       <mx:TextInput id="lastName1" />     </mx:HBox>   </mx:FormItem>   <mx:FormItem label="Email">     <mx:TextInput id="email" />   </mx:FormItem>   <mx:FormItem label="Fixed Total Charge:"  width="100%">              <mx:TextInput id="fixedChg"  width="50%" />           </mx:FormItem>     <mx:FormItem direction="horizontal" width="100%">     <mx:FormItem label="Fixed Total Charge: aaa" > <mx:TextInput id="fixedChga"  /> </mx:FormItem>            <mx:FormItem label="Per aaa" > <mx:TextInput id="perUnita" /> </mx:FormItem> <mx:FormItem label="Fixed Per Unit Charge aaa"> <mx:TextInput id="perUnitChga"  /> </mx:FormItem>   </mx:FormItem>   <mx:FormItem label="">     <mx:Button label="Submit" />   </mx:FormItem>    </mx:Form> see, how fixed total charge (formitem label) and fixed total charge: aaa (formitem label) are not vertically aligned? Fixed total charge: aaa (formitem label) starts right under the textbox. I need to push it to left a bit more.

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Burak Toker
10/07/2009 02:30 PM

d'oh:     <mx:FormItem label="Fixed Total Charge: aaa"  paddingLeft="-130"     > does it. ----- Excess quoted text cut - see Original Post for more -----


<< Previous Thread Today's Threads Next Thread >>

Search flex

May 25, 2012

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
     1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31     

Designer, Developer and mobile workflow conference