5 Replies Latest reply on May 12, 2011 7:20 AM by PhantomGAD

    spark Form

    pzzzza

      is it possible to control vertical gap between <s:Form> children?

       

      default gap between <s:FormItem> seems large for me

       

      im using

       

      <s:Scroller width="100%" height="100%">

           <s:Group>

                <s:Form>

                     <s:FormItem label="asd:">

                          <s:Label id="interanalID"/>

                     </s:FormItem>

                     <s:FormItem label="isVerified:">

                          <s:CheckBox id="isVerified"/>

                     </s:FormItem>

                     <s:FormItem label="Name:">

                          <s:TextInput id="instrumentName"/>

                     </s:FormItem>

                 </s:Form>

           </s:Group>

      </s:Scroller>

        • 1. Re: spark Form
          Shongrunden Adobe Employee

          You could change the gap on the Form's layout:

           

          <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                                 xmlns:s="library://ns.adobe.com/flex/spark">
             
              <s:controlBarContent>
                  <s:HSlider id="hs" minimum="-10" maximum="50" value="6" />
              </s:controlBarContent>
             
              <s:Form>
                 <s:layout>
                      <s:FormLayout gap="{hs.value}" />
                  </s:layout>
                 
                  <s:FormItem label="asd:">
                      <s:Label id="interanalID"/>
                  </s:FormItem>
                 
                  <s:FormItem label="isVerified:">
                      <s:CheckBox id="isVerified"/>
                  </s:FormItem>
                 
                  <s:FormItem label="Name:">
                      <s:TextInput id="instrumentName"/>
                  </s:FormItem>
              </s:Form>

           

          </s:Application>

          • 2. Re: spark Form
            Aurelien Vannieuwenhuyze Level 1

            I think that you must use the <mx:Form> component.

             

            Because there is no implementation of <s:Form> in the Spark library :

             

             

            <s:Scroller

             

             

            width="100%" height="100%">

             

             

             

            <s:Group>

             

             

             

            <mx:Form verticalGap="30" x.stModConnexion_Start="57" y.stModConnexion_Start="33">

             

             

             

            <mx:FormItem label="asd:">

             

             

             

            <s:Label id="interanalID"/>

             

             

             

            </mx:FormItem>

             

             

             

            <mx:FormItem label="isVerified:">

             

             

             

            <s:CheckBox id="isVerified"/>

             

             

             

            </mx:FormItem>

             

             

             

            <mx:FormItem label="Name:">

             

             

             

            <s:TextInput id="instrumentName"/>

             

             

             

            </mx:FormItem>

             

             

             

            </mx:Form>

             

             

             

            </s:Group>

             

             

             

            </s:Scroller>

            • 3. Re: spark FormItems
              eprevot123 Level 2

              Even reducing the gap to 0, the spark FormItems are still too tall. I would like to have the same space between my components than I had with mx Form/FormItems.

               

              how can we reduce the padding of FormItems ?

              • 4. Re: spark FormItems
                CleanCoder

                You will need to create a custom FormItem skin. The current FormItemSkin class uses a constraint based layout with fixed values to control the layout. Make a copy of the class and customize as required.

                • 5. Re: spark FormItems
                  PhantomGAD

                  you can set negative values

                  <s:layout>
                          <s:FormLayout gap="-10" paddingLeft="-15" paddingRight="-15"/>
                  </s:layout>