Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #104121

Re: Adding Icon To Tkinter Window

From Wildman <best_lay@yahoo.com>
Subject Re: Adding Icon To Tkinter Window
Newsgroups comp.lang.python
References <tIadnY8e89YQkEbLnZ2dnUU7-LHNnZ2d@giganews.com> <mailman.231.1457207749.20602.python-list@python.org>
Organization Wildman Productions
Message-ID <bKOdnR9ActblW0bLnZ2dnUU7-IsAAAAA@giganews.com> (permalink)
Date 2016-03-05 23:56 -0600

Show all headers | View raw


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!

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Adding Icon To Tkinter Window Wildman <best_lay@yahoo.com> - 2016-03-05 10:47 -0600
  Re: Adding Icon To Tkinter Window Grant Edwards <invalid@invalid.invalid> - 2016-03-05 18:08 +0000
    Re: Adding Icon To Tkinter Window Wildman <best_lay@yahoo.com> - 2016-03-05 12:47 -0600
    Re: Adding Icon To Tkinter Window Rick Johnson <rantingrickjohnson@gmail.com> - 2016-03-09 08:39 -0800
  Re: Adding Icon To Tkinter Window - Followup Wildman <best_lay@yahoo.com> - 2016-03-05 12:10 -0600
    Re: Adding Icon To Tkinter Window - Followup Christian Gollwitzer <auriocus@gmx.de> - 2016-03-05 19:36 +0100
      Re: Adding Icon To Tkinter Window - Followup Wildman <best_lay@yahoo.com> - 2016-03-05 23:53 -0600
        Re: Adding Icon To Tkinter Window - Followup Christian Gollwitzer <auriocus@gmx.de> - 2016-03-06 10:16 +0100
          Re: Adding Icon To Tkinter Window - Followup Wildman <best_lay@yahoo.com> - 2016-03-06 10:30 -0600
            Re: Adding Icon To Tkinter Window - Followup Serhiy Storchaka <storchaka@gmail.com> - 2016-03-09 19:09 +0200
            RE: Adding Icon To Tkinter Window - Followup Joaquin Alzola <Joaquin.Alzola@lebara.com> - 2016-03-09 17:14 +0000
  Re: Adding Icon To Tkinter Window Mark Lawrence <breamoreboy@yahoo.co.uk> - 2016-03-05 18:38 +0000
    Re: Adding Icon To Tkinter Window Wildman <best_lay@yahoo.com> - 2016-03-05 12:50 -0600
  Re: Adding Icon To Tkinter Window Serhiy Storchaka <storchaka@gmail.com> - 2016-03-05 21:55 +0200
    Re: Adding Icon To Tkinter Window Wildman <best_lay@yahoo.com> - 2016-03-05 23:56 -0600
  Re: Adding Icon To Tkinter Window Terry Reedy <tjreedy@udel.edu> - 2016-03-05 16:38 -0500
    Re: Adding Icon To Tkinter Window Wildman <best_lay@yahoo.com> - 2016-03-06 00:04 -0600
    Re: Adding Icon To Tkinter Window Rick Johnson <rantingrickjohnson@gmail.com> - 2016-03-09 08:41 -0800
  Re: Adding Icon To Tkinter Window Wildman <best_lay@yahoo.com> - 2016-03-06 00:09 -0600

csiph-web