Latest Tutorials| Questions and Answers|Ask Questions?|Site Map

Home Flex Container Grid layout container

Related Tutorials


Share on Google+Share on Google+

Grid layout container

Grid container places the child components in columns and rows.

Grid layout container


Grid container places the child components in columns and rows. This is very similar to html tables. Inside the Grid tag, GridRow tag is used to represent the row for the table. GridItem tag inside the GridRow is used to place the actual components in the grid. Adding multiple GridRow tags will create that many rows for the grid.







<?xml version="1.0" encoding="utf-8"?>

<mx:Application xmlns:mx="" layout="absolute">

<mx:Grid width="280" height="150" x="100" y="100" backgroundColor="white">

<mx:GridRow width="100%" height="100%">

<mx:GridItem width="100%" height="100%">

<mx:Image source="assets/images/Sunset.jpg" width="135" height="103"/>


<mx:GridItem width="100%" height="100%">

<mx:Image source="assets/images/Blue hills.jpg" width="135" height="103"/>



<mx:GridRow width="100%" height="100%" backgroundColor="#99CCFF">

<mx:GridItem width="174" height="100%" colSpan="2" horizontalAlign="center" verticalAlign="middle">

<mx:Button label="Previous"/>

<mx:Button label="Next"/>






Download the code:

If you enjoyed this post then why not add us on Google+? Add us to your Circles

Liked it!  Share this Tutorial

Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: November 14, 2009

Related Tutorials

Discuss: Grid layout container  

Post your Comment

Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image