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 samecapabilities as GtkTable for arranging widgets in a rectangular grid, but does support height-for-width geometry management.
TableGidBuilder builder() static nothrowGet builder for [gtk.table.Table] Returns: New builder objectvoid 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) nothrowAdds 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, ...void attachDefaults(gtk.widget.Widget widget, uint leftAttach, uint rightAttach, uint topAttach, uint bottomAttach) nothrowAs 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) nothrowGets the amount of space between column col, and column col + 1. See [gtk.table.Table.setColSpacing].uint getDefaultColSpacing() nothrowGets 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 spacinguint getDefaultRowSpacing() nothrowGets 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 spacingbool getHomogeneous() nothrowReturns whether the table cells are all constrained to the same width and height. (See gtk_table_set_homogeneous ()) Returns: true if the cells are all constrained to the same sizeuint getRowSpacing(uint row) nothrowGets the amount of space between row row, and row row + 1. See [gtk.table.Table.setRowSpacing].void getSize(out uint rows, out uint columns) nothrowGets the number of rows and columns in the table.void resize(uint rows, uint columns) nothrowIf 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) nothrowAlters the amount of space between a given table column and the following column.void setColSpacings(uint spacing) nothrowSets the space between every column in table equal to spacing.void setHomogeneous(bool homogeneous) nothrowChanges the homogenous property of table cells, ie. whether all cells are an equal size or not.void setRowSpacing(uint row, uint spacing) nothrowChanges the space between a given table row and the subsequent row.void setRowSpacings(uint spacing) nothrowSets the space between every row in table equal to spacing.Fluent builder implementation template for gtk.table.Table
T columnSpacing(uint propval) nothrowT homogeneous(bool propval) nothrowT nColumns(uint propval) nothrowT nRows(uint propval) nothrowT rowSpacing(uint propval) nothrowFluent builder for gtk.table.Table