gtk.table

Module for [Table] class

Types 3

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.Table.new_], the size of which can later be changed with [gtk.table.Table.resize].

Widgets can be added to a table using [gtk.table.Table.attach] or the more convenient (but slightly less flexible) [gtk.table.Table.attachDefaults].

To alter the space next to a specific row, use [gtk.table.Table.setRowSpacing], and for a column, [gtk.table.Table.setColSpacing]. The gaps between all rows or columns can be changed by calling [gtk.table.Table.setRowSpacings] or [gtk.table.Table.setColSpacings] respectively. Note that spacing is added between the children, while padding added by [gtk.table.Table.attach] is added on either side of the widget it belongs to.

[gtk.table.Table.setHomogeneous], 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.

Methods
GType _gType() @property
Table self()Returns `this`, for use in `with` statements.
TableGidBuilder builder()Get builder for [gtk.table.Table] Returns: New builder object
uint columnSpacing() @property
void columnSpacing(uint propval) @property
bool homogeneous() @property
void homogeneous(bool propval) @property
uint nColumns() @property
void nColumns(uint propval) @property
uint nRows() @property
void nRows(uint propval) @property
uint rowSpacing() @property
void rowSpacing(uint propval) @property
void attach(gtk.widget.Widget child, uint leftAttach, uint rightAttach, uint topAttach, uint bottomAttach, gtk.types.AttachOptions xoptions, gtk.types.AttachOptions yoptions, uint xpadding, uint ypadding)Adds a widget to a table. The number of “cells” that a widget will occupy is specified by leftattach, rightattach, topattach and bottomattach. These each represent the leftmost, rightmost, uppe...
void attachDefaults(gtk.widget.Widget widget, uint leftAttach, uint rightAttach, uint topAttach, uint bottomAttach)As there are many options associated with [gtk.table.Table.attach], this convenience function provides the programmer with a means to add children to a table with identical padding and expansion op...
uint getColSpacing(uint column)Gets the amount of space between column col, and column col + 1. See [gtk.table.Table.setColSpacing].
uint getDefaultColSpacing()Gets the default column spacing for the table. This is the spacing that will be used for newly added columns. (See [gtk.table.Table.setColSpacings]) Returns: the default column spacing
uint getDefaultRowSpacing()Gets the default row spacing for the table. This is the spacing that will be used for newly added rows. (See [gtk.table.Table.setRowSpacings]) Returns: the default row spacing
bool getHomogeneous()Returns whether the table cells are all constrained to the same width and height. (See gtktableset_homogeneous ()) Returns: true if the cells are all constrained to the same size
uint getRowSpacing(uint row)Gets the amount of space between row row, and row row + 1. See [gtk.table.Table.setRowSpacing].
void getSize(out uint rows, out uint columns)Gets the number of rows and columns in the table.
void resize(uint rows, uint columns)If you need to change a table’s size after it has been created, this function allows you to do so.
void setColSpacing(uint column, uint spacing)Alters the amount of space between a given table column and the following column.
void setColSpacings(uint spacing)Sets the space between every column in table equal to spacing.
void setHomogeneous(bool homogeneous)Changes the homogenous property of table cells, ie. whether all cells are an equal size or not.
void setRowSpacing(uint row, uint spacing)Changes the space between a given table row and the subsequent row.
void setRowSpacings(uint spacing)Sets the space between every row in table equal to spacing.
Constructors
this(void * ptr, Flag!"Take" take)
this(uint rows, uint columns, bool homogeneous)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.Table.resize]. ro...
Methods
T columnSpacing(uint propval)
T homogeneous(bool propval)
T nColumns(uint propval)
T nRows(uint propval)
T rowSpacing(uint propval)

Fluent builder for [gtk.table.Table]

Methods