GtkSizeGroup Constructor

GtkSizeGroup (GtkSizeGroupMode mode);

A GtkSizeGroup is not a widget taking up any space, rather providing additional bindings between widgets.

At first, create your application as you would do normally: Instantiate widgets, add them to containers and so. After that, create a GtkSizeGroup and add widgets to it with add_widget() and the widgets will magically have the same size.

Example 114. Using a GtkSizeGroup

//we create two buttons:
// one has two lines, being higher than the second
$oh = new GtkButton("Oh!\nOh!");
// the other has a longer text, making it wider
// than the first
$longer = new GtkButton('This is a longer text');

$box = new GtkHBox();

//but GtkSizeGroup saves the day:
// both buttons get the same height and width!
$group = new GtkSizeGroup(Gtk::SIZE_GROUP_BOTH);

$wnd = new GtkWindow();
$wnd->connect_simple('destroy', array('gtk', 'main_quit'));