how to remove icon - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: GUI (https://python-forum.io/forum-10.html) +--- Thread: how to remove icon (/thread-35274.html) |
how to remove icon - ilyess68ysl - Oct-15-2021 hello everyone, I am new to python GUI creation and I would like to know how to remove the application icon Regards, Ilyess RE: how to remove icon - menator01 - Oct-15-2021 Which application? Most will allow you to replace them. RE: how to remove icon - ilyess68ysl - Oct-15-2021 (Oct-15-2021, 06:26 AM)menator01 Wrote: Which application? Most will allow you to replace them. RE: how to remove icon - menator01 - Oct-15-2021 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() RE: how to remove icon - ilyess68ysl - Oct-15-2021 (Oct-15-2021, 09:38 AM)menator01 Wrote: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() Thanks you ! |