Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Keeping focus with sequential Tkinter windows?

Reply
Thread Tools

Keeping focus with sequential Tkinter windows?

 
 
William McBrine
Guest
Posts: n/a
 
      05-28-2008
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to configure Tkinter Listbox to disable state keeping selecteditem highlighted Sarbjit singh Python 1 07-18-2012 11:47 PM
this.window.focus() vs. window.focus() vs. this.focus() Roger Javascript 3 03-08-2007 08:53 PM
designMode on an iframe - relocating images in the dom and keeping their focus oopaevah@yahoo.co.uk Javascript 0 01-01-2007 08:42 PM
keeping focus on a text field laredotornado@zipmail.com Javascript 6 05-30-2006 03:23 PM
Keeping Cells from getting Focus? Josh Grameson ASP .Net Datagrid Control 3 05-09-2006 08:03 AM



Advertisments