Tkinter - Force toplevel window to stay on top of Tk() window

R

rahulnag22

Hi,
I have a Tk() window "base_win = Tk()" with multiple frames on it
having a combination of widgets. If I click on say a button widget
which launches a new top level window "new_win = TopLevel()", I was
looking for a way for this "new_win" to always stay on top of
"base_win" till I close "new_win", as a result also not allowing any
selections to be made in the "base_win" .
Thanks
Rahul
 
K

kyosohma

Hi,
I have a Tk() window "base_win = Tk()" with multiple frames on it
having a combination of widgets. If I click on say a button widget
which launches a new top level window "new_win = TopLevel()", I was
looking for a way for this "new_win" to always stay on top of
"base_win" till I close "new_win", as a result also not allowing any
selections to be made in the "base_win" .
Thanks
Rahul

You need to research showing modal dialogs. This link looks promising:

http://mail.python.org/pipermail/tkinter-discuss/2005-March/000371.html

This one from Lundh's site has better explanations on dialog's in
general:

http://effbot.org/tkinterbook/tkinter-dialog-windows.htm


Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,479
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top