Home > Net >  Tkinter make overrideredirect window appear on top of other windows when clicked from taskbar
Tkinter make overrideredirect window appear on top of other windows when clicked from taskbar

Time:07-19

How to display a custom Tkinter window (with overrideredirect true) on top of other opened windows when clicking from the taskbar icon? My code below works (maximize not implemented yet) except when this Tkinter window is overlapped by other non-Tkinter windows. For instance, when this Tkinter window is situated below two windows (of other programs) and when called (by clicking the taskbar icon), it will take 2 clicks on that icon before this window will appear on top of those 2 windows. I want to bring my window automatically on top when its taskbar icon clicked.

I based my code from Custom Tkinter window

CodePudding user response:

After looking for related answers and recommendations of Coder, I finally solved my problem. In my solution, I used the technique from Window demonstration

If someone can transform my code into a classful syntax, please comment since I have a hard time in doing so hehe. Code optimizations are very welcomed.

  • Related