hi guys, when message bo is clicked it makes window1 go in front of window2, not a big deal but is there anyway to keep window 2 in front? I’ve tried withdraw but it deletes the window instead
Unfortunately, to a large extend this is an artifact not of the widget
kit (tkinter) but of your desktop’s window management policies.
On some desktop it is policy that the window with the focus is on top.
And/or, separately, that clicking on a window brings it to the front
(and gives it focus).
tkinter has specific focus methods: https://tkdocs.com/shipman/focus.html
so you could experiment with using those instead of clicking on the
window.
Alternatively, if your objective is that window 2 is always above window
1 you might notice window 1 getting focus and use the .lift() method
on window 2 to bring it in front of window 1: https://tkdocs.com/shipman/toplevel.html
I’d expect that to shuffle the stacking order without changing the
focus. Untested.