how to align controls left, center and right


/ Published in: MXML
Save to your folder(s)

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


Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.