Grid with column span and row span : Grid « Container « Flex

Home
Flex
1.Chart
2.Components
3.Container
4.Data Model
5.Development
6.Effects
7.Event
8.Graphics
9.Grid
10.Style
Flex » Container » GridScreenshots 
Grid with column span and row span
Grid with column span and row span
           

<!--
Code from Flex Documentation "Using Adobe Flex 4".

This user guide is licensed for use under the terms of the Creative Commons Attribution 
Non-Commercial 3.0 License. 

This License allows users to copy, distribute, and transmit the user guide for noncommercial 
purposes only so long as 
  (1proper attribution to Adobe is given as the owner of the user guide; and 
  (2any reuse or distribution of the user guide contains a notice that use of the user guide is governed by these terms. 
The best way to provide notice is to include the following link. 
To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/

-->


<!-- containers\layouts\GridRowSpan.mxml -->
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:mx="library://ns.adobe.com/flex/mx"
    xmlns:s="library://ns.adobe.com/flex/spark">
    <mx:Grid id="myGrid">
        <!-- Define Row 1. -->
        <mx:GridRow id="row1" height="33%">
            <!-- Define the first cell of Row 1. -->
            <mx:GridItem>
                <mx:Button label="Button 1" />
            </mx:GridItem>
            <mx:GridItem>
                <mx:Button label="2" />
            </mx:GridItem>
            <mx:GridItem>
                <mx:Button label="Button 3" />
            </mx:GridItem>
            <mx:GridItem rowSpan="2">
                <mx:Button label="Button 3a" height="100%" />
            </mx:GridItem>
            <mx:GridItem rowSpan="3">
                <mx:Button label="Button 3b" height="100%" />
            </mx:GridItem>
        </mx:GridRow>
        <!-- Define Row 2. -->
        <mx:GridRow id="row2" height="33%">
            <!-- Define a single cell to span three columns of Row 2. -->
            <mx:GridItem colSpan="3" horizontalAlign="center">
                <mx:Button label="Long-Named Button 4" />
            </mx:GridItem>
        </mx:GridRow>
        <!-- Define Row 3. -->
        <mx:GridRow id="row3" height="33%">
            <!-- Define an empty first cell of Row 3. -->
            <mx:GridItem />
            <!-- Define a cell to span columns and and of Row 3. -->
            <mx:GridItem colSpan="3">
                <mx:Button label="Button 5 expands across 3 columns"
                    width="75%" />
            </mx:GridItem>
        </mx:GridRow>
    </mx:Grid>
</s:Application>

   
    
    
    
    
    
    
    
    
    
    
  
Related examples in the same category
1.Fill GridItem with ButtonFill GridItem with Button
2.Include five buttons across the top rowInclude five buttons across the top row
3.Grid Row SpanGrid Row Span
4.Select the last row in a GridSelect the last row in a Grid
5.Use Grid to layout controlsUse Grid to layout controls
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.