GUI as a class

GUIs are conveniently implemented as classes
Classes in Python are similar to classes in Java and C++
Constructor: create and pack all widgets
Methods: called by buttons, events, etc.
Attributes: hold widgets, widget variables, etc.
The class instance can be used as an encapsulated GUI component in other GUIs (like a megawidget)

previousnexttable of contents