GtkAlignment Constructor

GtkAlignment Constructor

GtkAlignment (double xalign, double yalign, double xscale, double yscale);

A GtkAlignment object has control over its child widget's relative position and size. Each parameter is a double, with the minimum value being 0.0 and the maximum value being 1.0.

The first two parameters describe the positioning of the child widget, with 0.0 being the left or top of the containing GtkAlignment and 1.0 being the right or bottom. A child with the setting 0.5, 0.5 as the first two parameters is fully centred, with scale being taken into consideration throughout.

The second pair of parameters determine the scale of the child widget, with the setting 1.0, 1.0 having the child widget fill the available area and the setting 0.0, 0.0 shrinking the child to its minimum possible size. If the widget has no children of its own, that can be just a couple of pixels in each direction - but it must obey the size requests made by any such children.

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