By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,002 Members | 1,020 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,002 IT Pros & Developers. It's quick & easy.

Keeping focus with sequential Tkinter windows?

P: n/a
So, basically what I'm doing is this:

window1 = Tkinter.Tk()
....
window1.destroy()
....
window2 = Tkinter.Tk()

This works well in Linux and Mac OS X (and the PyGtk equivalent works on
all platforms), but in Windows XP, the second window comes up without
focus. (I have to click on it to focus it.) This is true even with no
other windows on screen. I've tried window2.focus_set(), window2.lift(),
etc., to no avail. What's the right way to do this?

--
09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0 -- pass it on
Jun 27 '08 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.