Python Forum
how to remove icon
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to remove icon
#1
hello everyone, I am new to python GUI creation and I would like to know how to remove the application icon
Regards,
Ilyess
Reply
#2
Which application? Most will allow you to replace them.
I welcome all feedback.
The only dumb question, is one that doesn't get asked.
My Github
How to post code using bbtags


Reply
#3
Photo 
(Oct-15-2021, 06:26 AM)menator01 Wrote: Which application? Most will allow you to replace them.

İmage

Attached Files

Thumbnail(s)
   
Reply
#4
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


Reply
#5
(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 !
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Exclamation [PyQt] Setting icon on QAction from outside QGuiApplication gradlon93 3 1,681 Jan-04-2023, 11:37 AM
Last Post: gradlon93
  PyQt6 QAction with icon and string malonn 2 1,620 Sep-12-2022, 11:59 AM
Last Post: malonn
  Icon in tkinter menator01 8 4,846 May-03-2020, 02:01 PM
Last Post: wuf
  [Tkinter] Password Reveal Icon Evil_Patrick 2 4,591 Nov-29-2019, 02:20 PM
Last Post: Evil_Patrick
  [Tkinter] Window Icon Evil_Patrick 6 7,985 Oct-18-2019, 11:26 AM
Last Post: Evil_Patrick
  Button with Image Icon Friend 2 6,773 Jul-25-2019, 09:39 AM
Last Post: Friend
  [PyQt] Hide Dock Icon for QSystemTrayIcon App AeglosGreeenleaf 0 3,264 Jun-20-2019, 07:21 PM
Last Post: AeglosGreeenleaf
  [PyQt] How is this tray icon throbber done? JackDinn 7 4,739 Mar-05-2018, 02:19 PM
Last Post: JackDinn

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020