0

I'm making a simple GUI Application using Tkinter(Python). And I want it to minimize to System Tray and keep running. Is there any way to do so?

  • You can try [pystray](https://pystray.readthedocs.io/en/latest/index.html). – acw1668 Nov 18 '21 at 07:25
  • Does this answer your question? [Minimize the window tkinter in the windows system tray](https://stackoverflow.com/questions/56109891/minimize-the-window-tkinter-in-the-windows-system-tray) – wovano Oct 19 '22 at 12:09

1 Answers1

0

Based on this answer, you can use root.withdraw() method or packages like pystray.

The entire solution consists of two parts:

  1. Hide/restore tkinter window
  2. Create/delete systray object

1:

#import stuff...

root = tk.Tk()

root.withdraw() #hide
root.deiconify() #show again

Also remember to use mainloop()


2:

You can use packages like pystray,...

I don't know much about pystray or whatever like that, but you can follow its documentation and try its examples.

cigien
  • 57,834
  • 11
  • 73
  • 112
Hung
  • 155
  • 10