[Tkinter-discuss] icon for main window

Michael Lange klappnase at web.de
Mon Jan 15 10:59:55 CET 2007


On Mon, 15 Jan 2007 09:20:13 +0200
Alexander Belchenko <bialix at ukr.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> I wrote simple GUI program. But I have problem with setting icon for main window
> of program. Icon works on Win32 well, but linux user report about error.
> 
> The code in question:
> 
>         # create root window
>         self.root = Tk()
>         self.root.title('Bazaar configuration')
>         if os.path.isfile('./olive-branches.ico'):
>             self.root.iconbitmap('./olive-branches.ico')
> 

<snip>

Hi Alexander,

on linux you will need the fully qualified path to an .xbm bitmap preceded by an "@", 
like self.root.iconbitmap('@/usr/share/icons/olive-branches.xbm').

I hope this helps

Michael


More information about the Tkinter-discuss mailing list