robertlugg / easygui

easygui for Python
http://easygui.readthedocs.org/en/master/
BSD 3-Clause "New" or "Revised" License
455 stars 114 forks source link

Is there any way to change TK red icon in Windows? #143

Open marchiosim opened 6 years ago

marchiosim commented 6 years ago

2

Is there any way to change the red TK icon attached as image?

zadacka commented 6 years ago

@sepvan - I don't think that there is a nice configurable way to do this directly via easygui (yet), so to get what you want immediately there will be a work around required...

This similar question on StackOverflow suggests using iconbitmap to load a new favicon across the top of the red TK like so:

tk = Tk()
tk.iconbitmap(default='foo.ico')
Label(tk, text='This window now has a custom icon.').pack()

To do this with easygui you can try adding this step during the box instantiation for whichever type of box you're creating.

I can't immediately test this as I'm using Mac and the icon doesn't display. If you do give the above a go, please let us know whether it works! We can think about adding a feature to optionally override the default icon.

BaggioMarco commented 3 years ago

Hi, there is some news about this questions? @zadacka and @marchiosim in case you found a solution, could you share a simple working example? thank you in advance