[Patches] [ python-Patches-1096231 ] Fix for wm_iconbitmap to allow .ico files under Windows.

SourceForge.net noreply at sourceforge.net
Wed Jan 5 05:09:56 CET 2005


Patches item #1096231, was opened at 2005-01-05 17:09
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1096231&group_id=5470

Category: Tkinter
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: John Fouhy (johnfouhy)
Assigned to: Martin v. Löwis (loewis)
Summary: Fix for wm_iconbitmap to allow .ico files under Windows.

Initial Comment:
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.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1096231&group_id=5470


More information about the Patches mailing list