GtkTable

Container that provides a two-dimensional grid for packing widgets.

Object Hierarchy

GObject
`-- GtkObject
       `-- GtkWidget
              `-- GtkContainer
                     `-- GtkTable

Description

GtkTable is a container that provides a simple way of aligning many widgets in a window, both horizontally and vertically. Although not as flexible as GtkFixed, it's easier to use and allows for relative positioning, by simply defining the number of rows and columns. The resulting cells have a structure similar to that of a GtkBox, allowing a single child per cell, though the child can span along multiple rows or columns.

Adding widgets to a GtkTable is mainly done through the attach() method, that provides a great deal of control over the way the child should be placed within the table. The attach_defaults() and add() methods are of lesser interest. To remove a widget from the table, you can use remove() .

Accessing child widgets placed within a GtkTable can be done through the get_children() method, inherited from GtkContainer. It returns a list of the container's children.

See also: GtkVBox, GtkHBox, GtkFixed.

Constructors

GtkTable ([int n_rows = 1 [, int n_columns = 1 [, bool homogeneous = false]]]);

-- Creates a grid for packing widgets in regular patterns.

Methods

attach()
  Adds widgets to a GtkTable.
attach_defaults()
  Adds widgets to a GtkTable using default options.
get_col_spacing()
  Gets the spacing after a given column.
get_default_col_spacing()
  Gets the default column spacing for the table.
get_default_row_spacing()
  Gets the default row spacing for the table.
get_homogeneous()
  Returns the current value of the homogeneous property.
get_row_spacing()
  Gets the amount of space below a given row.
resize()
  Changes the size of a GtkTable after its creation.
set_col_spacing()
  Sets the space between a column and the adjacent columns.
set_col_spacings()
  Sets the space between every column to the same given value.
set_homogeneous()
  Changes the homogenous property of table cells.
set_row_spacing()
  Sets the space between a row and the adjacent rows.
set_row_spacings()
  Sets the space between every row to the same given value.