| PyGTK Tutorial | ||
|---|---|---|
| <<< Previous | Chapter 10. Container Widgets | Next >>> |
There are only two calls associated with
the Alignment widget:
alignment = GtkAlignment(xalign, yalign, xscale, yscale ); alignment.set( xalign, yalign, xscale, yscale) |
The GtkAlignment() function creates a new Alignment widget with the specified parameters. The set() method allows the alignment paramters of an exisiting Alignment widget to be altered.
All four alignment parameters are floating point numbers which can range from 0.0 to 1.0. The xalign and yalign arguments affect the position of the widget placed within the Alignment widget. The xscale and yscale arguments effect the amount of space allocated to the widget.
A child widget can be added to this Alignment
widget using:
alignment.add((child_widget) |
For an example of using an Alignment widget, refer to the progressbar.py example for the Progress Bar widget.
| <<< Previous | Home | Next >>> |
| Container Widgets | Up | Fixed Container |