tkinter and focus...

Uwe Schmitt schmitt at num.uni-sb.de
Mon May 28 07:07:31 EDT 2001


Matthew Dixon Cowles <matt at mondoinfo.com> wrote:
| On 26 May 2001 12:37:58 GMT, Uwe Schmitt <schmitt at num.uni-sb.de>
| wrote:

|>in addition to a main window i construc an "informatio-window" using
|>Tkinter.Toplevel(). my question is: i'd like to manipulate this
|>widnow in order to make it the "active"-window. focus_set() doesnt
|>work.

| Uwe,
| You may find that sending the window focus_force() does what you want.

| Assuming that your app is running under Unix, in order to guarantee
| that a new window has the focus, you'll need the cooperation of a
| possibly-uncooperative window manager. Sending focus_force works on my
| laptop (Linux+GNOME) but not on my desktop machine (FreeBSD+wmx). It
| seems that not all window managers are prepared to be told by user
| programs how to sort out their windows in too much detail.

thanks, focus_force() works fine. now i've got other problems:
1) how can i change the order of widgets which are activated
   by TAB ?
2) my informationwindow (as described above) appears in the
   left upper corner of the screen, but it should appear
   near the main-window.

any hints ?

yours, uwe.


-- 

Uwe.Schmitt at num.uni-sb.de      Universität des Saarlandes
phone: +49 (0)681/302-2468     Geb. 36.1, Zi. 4.17, PF 151150
                               D-66041  Saarbrücken
http://www.rocksport.de        http://www.rocksport.de/first_ride.mp3




More information about the Python-list mailing list