and change the note file associated with the currently displayed photo. This additional
set of widgets should look familiar—the PyEdit text editor from earlier in this chapter
is attached to PyView in a variety of selectable modes to serve as a display and editing
widget for photo notes. Figure 11-14 shows PyView with the attached PyEdit note-
editing component opened (I resized the window a bit interactively for presentation
here).
Embedding PyEdit in PyView
This makes for a very big window, usually best viewed maximized (taking up the entire
screen). The main thing to notice, though, is the lower-right corner of this display,
above the scale—it’s simply an attached PyEdit object, running the very same code
listed in the earlier section. Because PyEdit is implemented as a GUI class, it can be
reused like this in any GUI that needs a text-editing interface.
When embedded this way, PyEdit is a nested frame attached to a slideshow frame. Its
menus are based on a frame (it doesn’t own the window at large), text content is stored
and fetched directly by the enclosing program, and some standalone options are
Figure 11-13. PyView after stopping a slideshow
PyView: An Image and Notes Slideshow | 729