Tkinter window focusing or selecting

B

Bob Greschke

I have a program with many "forms" (Toplevel windows with entry fields).
Sometimes when I .deiconify() and .lift() a form that is a child of another
form, but that just got buried under other forms it comes up 'not active'
(dimmed). I have to click on the title bar (or anywhere in the window)
before I can start entering stuff into the entry fields. It doesn't seem to
happen all of the time, which I don't understand. Doing a .focus_set()
after the .lift() fixes it, but then Tkinter loses track of which entry
field the cursor was in when the window got covered up. Is there something
else I should be calling after the .deiconify() and .lift() to make sure the
window get 'activated' (or what ever that state is)? This is on Linux at
this point.

Thanks!

Bob
 

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,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top