This chapter is the second in a two-part tour of the tkinter library. It picks up where Chapter 8 left off and covers some of the more advanced widgets and tools in the tkinter arsenal. Among the topics presented in this chapter:
Scrollbar widget: for
scrolling text, lists, and canvases
Listbox widget: a
list of multiple selections
Text widget: a
general text display and editing tool
Canvas widget: a
general graphical drawing tool
wait, and threads
Basic tkinter animation techniques
Clipboards, erasing widgets and windows, and so on
By the time you’ve finished this chapter, you will have seen the bulk of the tkinter library, and you will have all the information you need to compose larger, portable user interfaces of your own. You’ll also be ready to tackle the larger GUI techniques and more complete examples presented in Chapters 10 and 11. For now, let’s resume the widget show.
Menus are the pull-down lists you’re accustomed to seeing at the top of a window (or the entire display, if you’re accustomed to seeing them that way on a Macintosh). Move the mouse cursor to the menu bar at the top and click on a name (e.g., File), and a list of selectable options pops up under the name you clicked (e.g., Open, Save). The options within a menu might trigger actions, much like clicking on a button; ...