Class

GtkTable

[]

Description [src]

class Gtk.Table : Gtk.Container
  implements Atk.ImplementorIface, Gtk.Buildable {
  /* No available fields */
}

The GtkTable functions allow the programmer to arrange widgets in rows and columns, making it easy to align many widgets next to each other, horizontally and vertically.

Tables are created with a call to gtk_table_new(), the size of which can later be changed with gtk_table_resize().

Widgets can be added to a table using gtk_table_attach() or the more convenient (but slightly less flexible) gtk_table_attach_defaults().

To alter the space next to a specific row, use gtk_table_set_row_spacing(), and for a column, gtk_table_set_col_spacing(). The gaps between all rows or columns can be changed by calling gtk_table_set_row_spacings() or gtk_table_set_col_spacings() respectively. Note that spacing is added between the children, while padding added by gtk_table_attach() is added on either side of the widget it belongs to.

gtk_table_set_homogeneous(), can be used to set whether all cells in the table will resize themselves to the size of the largest widget in the table.

GtkTable has been deprecated. Use GtkGrid instead. It provides the same capabilities as GtkTable for arranging widgets in a rectangular grid, but does support height-for-width geometry management.

[]

Hierarchy

hierarchy this GtkTable implements_0 AtkImplementorIface this--implements_0 implements_1 GtkBuildable this--implements_1 ancestor_0 GtkContainer ancestor_0--this ancestor_1 GtkWidget ancestor_1--ancestor_0 ancestor_2 GInitiallyUnowned ancestor_2--ancestor_1 ancestor_3 GObject ancestor_3--ancestor_2
[]

Constructors

gtk_table_new

Used to create a new table widget. An initial size must be given by specifying how many rows and columns the table should have, although this can be changed later with gtk_table_resize(). rows and columns must both be in the range 1 .. 65535. For historical reasons, 0 is accepted as well and is silently interpreted as 1.

deprecated: 3.4 

[]

Instance methods

gtk_table_attach

Adds a widget to a table. The number of “cells” that a widget will occupy is specified by left_attach, right_attach, top_attach and bottom_attach. These each represent the leftmost, rightmost, uppermost and lowest column and row numbers of the table. (Columns and rows are indexed from zero).

deprecated: 3.4 

gtk_table_attach_defaults

As there are many options associated with gtk_table_attach(), this convenience function provides the programmer with a means to add children to a table with identical padding and expansion options. The values used for the GtkAttachOptions are GTK_EXPAND | GTK_FILL, and the padding is set to 0.

deprecated: 3.4 

gtk_table_get_col_spacing

Gets the amount of space between column col, and column col + 1. See gtk_table_set_col_spacing().

deprecated: 3.4 

gtk_table_get_default_col_spacing

Gets the default column spacing for the table. This is the spacing that will be used for newly added columns. (See gtk_table_set_col_spacings()).

deprecated: 3.4 

gtk_table_get_default_row_spacing

Gets the default row spacing for the table. This is the spacing that will be used for newly added rows. (See gtk_table_set_row_spacings()).

deprecated: 3.4 

gtk_table_get_homogeneous

Returns whether the table cells are all constrained to the same width and height. (See gtk_table_set_homogeneous ()).

deprecated: 3.4 

gtk_table_get_row_spacing

Gets the amount of space between row row, and row row + 1. See gtk_table_set_row_spacing().

deprecated: 3.4 

gtk_table_get_size

Gets the number of rows and columns in the table.

deprecated: 3.4 since: 2.22

gtk_table_resize

If you need to change a table’s size after it has been created, this function allows you to do so.

deprecated: 3.4 

gtk_table_set_col_spacing

Alters the amount of space between a given table column and the following column.

deprecated: 3.4 

gtk_table_set_col_spacings

Sets the space between every column in table equal to spacing.

deprecated: 3.4 

gtk_table_set_homogeneous

Changes the homogenous property of table cells, ie. whether all cells are an equal size or not.

deprecated: 3.4 

gtk_table_set_row_spacing

Changes the space between a given table row and the subsequent row.

deprecated: 3.4 

gtk_table_set_row_spacings

Sets the space between every row in table equal to spacing.

deprecated: 3.4 

Methods inherited from GtkContainer (33)
Methods inherited from GtkWidget (263)
Methods inherited from GObject (43)
Methods inherited from GtkBuildable (10)
[]

Properties

Gtk.Table:column-spacing
No description available.

Gtk.Table:homogeneous
No description available.

Gtk.Table:n-columns
No description available.

Gtk.Table:n-rows
No description available.

Gtk.Table:row-spacing
No description available.

Properties inherited from GtkContainer (3)
Properties inherited from GtkWidget (39)
[]

Signals

Signals inherited from GtkContainer (4)
Signals inherited from GtkWidget (69)
Signals inherited from GObject (1)

Class structure