Posted By

davidsi on 09/17/10


Tagged

align


Versions (?)

how to align controls left, center and right


 / Published in: MXML
 

very simple, make a grid with one row and 3 columns, each item in one of the columns.

  1. <mx:Grid width="100%" >
  2. <mx:GridRow width="100%" >
  3. <mx:GridItem horizontalAlign="left" width="33%" >
  4. <s:Label text="Left" />
  5. </mx:GridItem>
  6.  
  7. <mx:GridItem horizontalAlign="center" width="33%" >
  8. <s:Label text="center" />
  9. </mx:GridItem>
  10.  
  11. <mx:GridItem horizontalAlign="right" width="34%" >
  12. <s:Label text="Right" />
  13. </mx:GridItem>
  14. </mx:GridRow>
  15.  
  16. </mx:Grid>

Report this snippet  

You need to login to post a comment.