Chapter 5.
Widget Overview
The general steps to using a widget in PyGTK
are:
invoke Gtk* - one of various
functions to create a new widget. These are all detailed in this section.
Connect all signals and events we wish
to use to the appropriate handlers.
Set the attributes of the widget.
Pack the widget into a container using
the appropriate call such as GtkContainer.add()
or GtkBox.pack_start().
GtkWidget.show() the widget.
show() lets GTK know that we are
done setting the attributes of the widget, and it is ready to be displayed.
You may also use GtkWidget.hide()
to make it disappear again. The order in which you show the widgets is
not important, but I suggest showing the window last so the whole window
pops up at once rather than seeing the individual widgets come up on the
screen as they're formed. The children of a widget (a window is a widget
too) will not be displayed until the window itself is shown using the show()
method.