GtkTable Constructor

GtkTable Constructor

GtkTable ([int rows = 1 , [int columns = 1 , [bool homogeneous = FALSE ]]]);

It is not necessary to give the dimensions of a non-homogeneous GtkTable in the constructor, as the table will pick up the layout from the information given as its children are attached to it, and this will override the initial integer settings. If homogeneous is set to true the reverse will be the case, and the table's settings take precedence.

You will find that you need to use the attach() method throughout, as the way in which the add() method generally used in containers is implemented in GTK+ to always position an added child at 0, 1, 0, 1. Once a grid square has been filled, the widget taking up that space cannot be overwritten by another widget. The remove() method is fully operational.

The child widget sizing in a non-homogeneous GtkTable is relative, and will alter if one or more children is removed or resized. Again, this is not true for the child widgets in a homogeneous table.

There are a lot of parameters in the attach() method - nine in total - four of which are optional. Basically, if the homogeneous parameter in the constructor is set to true, there is very little point most of the time in using any of the four optional packing parameters. These come into their own when the children are not required to take up the same amount of space.

© Copyright 2003-2023 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.