Tk 8.4 adds a -default option to wm iconbitmap to
better support Microsoft Windows. Here is the link:
http://www.tcl.tk/man/tcl8.4/TkCmd/wm.htm#M18
This is the relevant information:
"On the Windows operating system, an additional flag is
supported: wm iconbitmap window ?-default? ?image?. If
the -default flag is given, the icon is applied to all
toplevel windows (existing and future) to which no
other specific icon has yet been applied. In addition
to bitmap image types, a full path specification to any
file which contains a valid Windows icon is also
accepted (usually .ico or .icr files), or any file for
which the shell has assigned an icon. Tcl will first
test if the file contains an icon, then if it has an
assigned icon, and finally, if that fails, test for a
bitmap."
This patch modifies Tkinter.py so that wm_iconbitmap
supports a 'default' keyword parameter which, if used,
will make the appropriate Tk call.
This allows you to change your Tkinter application
icons under Windows with one line of code :-) (and no
need for tkIcon, hakicon, etc)
For the record: I am running Windows XP Professional
SP2 and Python 2.3.4.
|