Oct-15-2021, 09:38 AM
import tkinter import tempfile, base64, zlib ICON = zlib.decompress(base64.b64decode('eJxjYGAEQgEBBiDJwZDBy' 'sAgxsDAoAHEQCEGBQaIOAg4sDIgACMUj4JRMApGwQgF/ykEAFXxQRc=')) _, ICON_PATH = tempfile.mkstemp() with open(ICON_PATH, 'wb') as icon_file: icon_file.write(ICON) tk = tkinter.Tk() tk.iconbitmap(default=ICON_PATH) label = tkinter.Label(tk, text="Window with transparent icon.") label.pack() tk.mainloop()
I welcome all feedback.
The only dumb question, is one that doesn't get asked.
My Github
How to post code using bbtags
The only dumb question, is one that doesn't get asked.
My Github
How to post code using bbtags