Live update of prefs for Tkinter applications?
Russell E. Owen
owen at astrono.junkwashington.emu
Thu Jan 24 20:29:11 EST 2002
Any hints on handling prefs for a Tkinter application?
Ideally, I'd like the user to be able to change fonts and colors and
have the changes propogate throughout the application. Clearly Tkinter
doesn't like working this way (with its option database that is only
used for creating new widgets), but instead prefers the user set prefs,
quit and restart.
I was wondering if anybody had worked out a satisfactory solution for
live update. I realize I could probably iterate through all widgets in
all toplevel windows to change their characteristics. This sounds awful
for an application with a lot of widgets.
If I do give up on live update for fonts and colors, I'm also wondering
if anybody has handled saving toplevel window positions and sizes.
(Editing a text file and then launching is especially bad for that case;
clearly there should be some way of recording current window positions.)
I'm also wondering if any competing GUI toolkit (such as wxPython)
handles live changing of prefs better. (I looked at the wxPython docs
and they seemed to suggest an approach similar to Tkinter, but I may
have missed something.)
-- Russell
More information about the Python-list
mailing list