Skip navigation
Currently Being Moderated

Create border around Grid/GridItem

Nov 25, 2011 12:46 AM

Hi,

 

I am stuck with a problem and no idea on how to proceed on this.

 

I have created a Grid and want to draw border around it so its appearance is like table. The borders are just not appearing. Can someone provide any direction what I may be missing.

 

Here is the code

 

 

[PHP]

 

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
    <mx:Style>
        Grid
        {
            horizontal-gap:-1;
            vertical-gap:-1;
            border-color:#000000;
            border-style:solid;
            border-thickness:5;
        }
        GridItem
        {
            border-color:#000000;
            border-style:solid;
            border-thickness:5;
        }
    </mx:Style>

    <mx:Grid x="31" y="24">
        <mx:GridRow>
            <mx:GridItem width="100" height="30">
                <mx:Label text ="Nitin">
                    
                </mx:Label>
            </mx:GridItem>
            <mx:GridItem width="100" height="30">
                <mx:Label text ="Nitin">
                    
                </mx:Label>
            </mx:GridItem>
            <mx:GridItem width="100" colSpan="2" height="30">
                <mx:Label text ="Nitin">
                    
                </mx:Label>
            </mx:GridItem>
        </mx:GridRow>
        
        <mx:GridRow>
            <mx:GridItem width="100" height="30">
                <mx:Label text ="Nitin">
                    
                </mx:Label>
            </mx:GridItem>
            <mx:GridItem width="120" colSpan="2" height="30">
                <mx:Label text ="Nitin">
                    
                </mx:Label>
            </mx:GridItem>
            <mx:GridItem width="100" colSpan="3" height="11">
                <mx:Label text ="Nitin">
                    
                </mx:Label>
            </mx:GridItem>
        </mx:GridRow>
        
        <mx:GridRow>
            <mx:GridItem width="100" height="30">
                <mx:Label text ="Nitin">
                    
                </mx:Label>
            </mx:GridItem>
            <mx:GridItem width="100" height="30">
                <mx:Label text ="Nitin">
                    
                </mx:Label>
            </mx:GridItem>
            <mx:GridItem width="120" colSpan="3" height="30">
                <mx:Label text ="Nitin">
                    
                </mx:Label>
            </mx:GridItem>
        </mx:GridRow>
    </mx:Grid>
</mx:Application>

[/PHP]

 
Replies

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points