I'm trying to make an app that uses Tkinter. Is there any way I can add options to its icon in the taskbar? (For example, when the Google Chrome icon in the taskbar is right-clicked, it shows Recently closed, Tasks, etc) By the taskbar icon, I mean the window's icon (not the services and background tasks or the system tray).
Asked
Active
Viewed 372 times
2
-
1You can try popup menu. So when you right-click, it shows up. Check this link - [Menus and Toolbars](https://zetcode.com/tkinter/menustoolbars/) – PCM Jun 05 '21 at 11:19
-
Thanks :) But I wanted the popup menu when I right-clicked the icon in the taskbar...Is that possible with any other module? (I wanted to add options other than Close window and Unpin from taskbar) – The Amateur Coder Jun 05 '21 at 13:02
-
1Did you mean a jump list like that? https://doc.qt.io/qt-5/qtwinextras-overview.html#jump-lists – 8349697 Jun 05 '21 at 19:05
-
Thanks a lot :) Is there any method to apply it in Tkinter? – The Amateur Coder Jun 06 '21 at 08:52
-
1I don't see in the documentation a direct way to do this with tkinter. It seems that people use third-party libraries to add system-specific features to their programs. [here](https://stackoverflow.com/questions/62372144/how-to-add-system-tray-to-my-tkinter-application-and-avoid-using-lots-of-pywin32) and [here](https://stackoverflow.com/questions/61716689/how-to-show-progress-in-taskbar-button-on-windows-10) – 8349697 Jun 07 '21 at 17:36
-
1Consider using other libraries/languages if you really need to make a jump list. Qt5 has a [QtWinExtras module](https://www.riverbankcomputing.com/static/Docs/PyQt5/api/qtwinextras/qtwinextras-module.html). And that's another question. – 8349697 Jun 07 '21 at 17:38
-
1Alternatively, you can add a list of recently closed files to the application menu, as is done in [Python IDLE](https://tkdocs.com/tutorial/idle.html). `File` -> `Recent Files`. – 8349697 Jun 07 '21 at 17:39