See All Titles |
![]() ![]() SummaryTk is a popular and endorsed toolkit that can handle windows, GUI events, and user interactions. Tkinter is Python's cross-platform interface to the Tk GUI toolkit that enables you to handle buttons and windows, and define their properties at a glance. The typical Tkinter distribution contains a basic set of 15 widgets, and some extra classes that can be used by your GUI applications.
Tkinter also provides the Image class. This class is used as a foundation to display graphic objects, including bitmaps and GIF images. Two subclasses are inherited from this class: BitmapImage and PhotoImage. All these Tkinter widgets have access to specific geometry management methods, which have the purpose of organizing them throughout the parent widget area. These methods are grouped in three distinct classes that provide a nice way to lay out child widgets in their parent widget. Tkinter exposes the following geometry manager classes: pack, grid, and place. Tkinter also allows you to create event bindings for every specific object, and after binding an event to a widget, you can specify which function should be called at the time the event occurs. This function (or method) is called callback. To complement Tkinter, you can also use the Python Mega Widgets. PMW is a toolkit for building high-level widgets in Python using the Tkinter module that provides many interesting and complex widgets.
|
© 2002, O'Reilly & Associates, Inc. |