Gtk.Alignment Class
A container that controls the alignment and size of its child.

See Also: Alignment Members


public class Alignment : Bin


An Alignment widget controls the alignment and size of its child widget. It has four settings: Alignment.Xscale, Alignment.Yscale, Alignment.Xalign, and Alignment.Yalign.

The scale settings are used to specify how much the child widget should expand to fill the space allocated to the Alignment. The values can range from 0 (meaning the child doesn't expand at all) to 1 (meaning the child expands to fill all of the available space).

The alignment settings are used to position the child widget within the available area. The values range from 0 (top or left) to 1 (bottom or right). If the scale settings are both set to 1, (making the child expand), the alignment settings have no effect.

To add a child to an Alignment, use the Container.Add method from the Gtk.Container class.


Namespace: Gtk
Assembly: gtk-sharp (in gtk-sharp.dll)
Assembly Versions: