Package wx :: Class GridSizer
[frames | no frames]

Type GridSizer

object --+        
         |        
    Object --+    
             |    
         Sizer --+
                 |
                GridSizer

Known Subclasses:
FlexGridSizer

A grid sizer is a sizer which lays out its children in a two-dimensional table with all cells having the same size. In other words, the width of each cell within the grid is the width of the widest item added to the sizer and the height of each grid cell is the height of the tallest item. An optional vertical and/or horizontal gap between items can also be specified (in pixels.)

Items are placed in the cells of the grid in the order they are added, in row-major order. In other words, the first row is filled first, then the second, and so on until all items have been added. (If neccessary, additional rows will be added as items are added.) If you need to have greater control over the cells that items are placed in then use the wx.GridBagSizer.


Method Summary
GridSizer __init__(self, rows, cols, vgap, hgap)
Constructor for a wx.GridSizer.
  __repr__(self)
int GetCols(self)
Returns the number of columns in the sizer.
int GetHGap(self)
Returns the horizontal gap (in pixels) between cells in the sizer.
int GetRows(self)
Returns the number of rows in the sizer.
int GetVGap(self)
Returns the vertical gap (in pixels) between the cells in the sizer.
  SetCols(self, cols)
Sets the number of columns in the sizer.
  SetHGap(self, gap)
Sets the horizontal gap (in pixels) between cells in the sizer
  SetRows(self, rows)
Sets the number of rows in the sizer.
  SetVGap(self, gap)
Sets the vertical gap (in pixels) between the cells in the sizer.

Method Details

__init__(self, rows=1, cols=0, vgap=0, hgap=0)
(Constructor)

Constructor for a wx.GridSizer. rows and cols determine the number of columns and rows in the sizer - if either of the parameters is zero, it will be calculated to from the total number of children in the sizer, thus making the sizer grow dynamically. vgap and hgap define extra space between all children.
Parameters:
rows
           (type=int)
cols
           (type=int)
vgap
           (type=int)
hgap
           (type=int)
Returns:
GridSizer
Overrides:
wx.Sizer.__init__

GetCols(self)

Returns the number of columns in the sizer.
Returns:
int

GetHGap(self)

Returns the horizontal gap (in pixels) between cells in the sizer.
Returns:
int

GetRows(self)

Returns the number of rows in the sizer.
Returns:
int

GetVGap(self)

Returns the vertical gap (in pixels) between the cells in the sizer.
Returns:
int

SetCols(self, cols)

Sets the number of columns in the sizer.
Parameters:
cols
           (type=int)

SetHGap(self, gap)

Sets the horizontal gap (in pixels) between cells in the sizer
Parameters:
gap
           (type=int)

SetRows(self, rows)

Sets the number of rows in the sizer.
Parameters:
rows
           (type=int)

SetVGap(self, gap)

Sets the vertical gap (in pixels) between the cells in the sizer.
Parameters:
gap
           (type=int)

Generated by Epydoc 2.1.20040428.rpd on Tue Apr 26 14:23:30 2005 http://epydoc.sf.net