title: Flex Forms: getting labels to line up, right-justified
body: <p>I thought this was the default behaviour (all the Adobe docs seem to indicate that this is the case).
  Say you have a form:
  Name: [<strong><em>_</em>__<em>_</em>__</strong>]
  Password: [<strong><em>_</em>__<em>_</em>____</strong>]</p>
  
  <p>generally you want Name and Password to line up on their right-hand side (right justification). The length should be the length of the longest label.</p>
  
  <p>When I add the following code to my MXML (authoring in Flex 4) it does not do that at all! But rather tjust crams everything left-justified, similar to the Name/Password example above.</p>
  
  <p>What's the solution?</p>
  
  <pre><code>&lt;s:Form id="directoryForm_A" width="100%"&gt;                      
      &lt;s:layout&gt;
          &lt;s:VerticalLayout horizontalAlign="justify"/&gt;
      &lt;/s:layout&gt;
      &lt;s:FormItem label="Click"&gt;
          &lt;s:Button label="Button"/&gt;
      &lt;/s:FormItem&gt;
      &lt;s:FormItem label="Root Directory"&gt;
          &lt;s:TextInput x="0" width="100%" enter="handleUserSetRootDirectory(event)"/&gt;
      &lt;/s:FormItem&gt;
  &lt;/s:Form&gt;
  </code></pre>