This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Fix for wm_iconbitmap to allow .ico files under Windows.
Type: Stage:
Components: Tkinter Versions: Python 2.3
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: loewis Nosy List: janc13, johnfouhy, loewis
Priority: normal Keywords: patch

Created on 2005-01-05 04:09 by johnfouhy, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
Tkinter.py.diff johnfouhy, 2005-01-05 04:09 Tkinter.py diff.
Messages (3)
msg47470 - (view) Author: John Fouhy (johnfouhy) Date: 2005-01-05 04:09
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.
msg47471 - (view) Author: Jan Claeys (janc13) Date: 2005-03-03 17:29
Logged In: YES 
user_id=412240

I have successfully tested this with Python 2.3.5 & Python
2.4 on Windows 2000.
msg47472 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2006-06-17 09:21
Logged In: YES 
user_id=21627

Thanks for the patch. Committed as r46999.
History
Date User Action Args
2022-04-11 14:56:09adminsetgithub: 41400
2005-01-05 04:09:56johnfouhycreate