Python/Tkinter - problem with "wm_attributes"

george boole at netcologne.de
Sun Mar 14 07:10:05 EST 2004


Greetings to all experts.

I'm running Python 2.3/Pythonwin 1.63 on Windows 98. I would like to 
create a window with Tkinter, that is always on top of the screen.

In Tkinter.py, Line 1375 f., I'm reading:
"On Windows, ... -topmost gets or sets whether this is a topmost window
(displays above all other windows)."

Therefore my simple code is:

#################################
# topmost.pyw
from Tkinter import *
root = Tk()
root.wm_attributes("-topmost", 1)
root.mainloop()
#################################

Started in IDLE (without the last line), the script runs successful.

Started in Pythonwin or executed from the Windows Explorer, it seems to
run endless, nothing happens, no window appears.

Other settings of attributes (-disabled, -toolwindow) failed in
the same way.

What do I have failed to notice?

Thanks for your help,

george




More information about the Python-list mailing list