Adding Icon To Tkinter Window
Wildman
best_lay at yahoo.com
Sun Mar 6 00:56:08 EST 2016
On Sat, 05 Mar 2016 21:55:40 +0200, Serhiy Storchaka wrote:
> On 05.03.16 18:47, Wildman via Python-list wrote:
>> Anybody have the correct method of adding an icon to a
>> window? I have found several code examples on the web
>> but they all result in an error. Thanks.
>
> On Windows:
>
> root.wm_iconbitmap(default='myapp.ico')
>
> .ico-file can contain several icons of different size.
>
> Otherwise if TkVersion >= 8.5:
>
> root.wm_iconphoto(True, PhotoImage(file='myapp16.gif'),
> PhotoImage(file='myapp32.gif'), ...)
>
> You can specify several icons of different size.
>
> If TkVersion >= 8.5 you can use .png-files.
Thanks. I will file away the snippets for later use. The
code provided by Mr. Gollwitzer is working for me on Linux.
--
<Wildman> GNU/Linux user #557453
The cow died so I don't need your bull!
More information about the Python-list
mailing list