Tkinter windows always on top in Win32

Fredrik Lundh effbot at telia.com
Wed May 10 15:44:16 EDT 2000


William Wicker <remove.me.wwicker at spectratechnologies.com> wrote:
> Oh No! Say it ain't so!
> 
> Seriously, this does pose a problem for me. I really need to get the
> 'keep-on-top' functionality. I suppose I'll need to look at some other
> GUI kits. 

keep on top of what?

to keep on top of another window of the same application,
use the "transient" method.

    toplevel.transient(mainwindow)

to keep it on top of any other application, you need to call
the proper Windows API function from a python extension
module.  to find out the HWND for a toplevel window, use:

    hwnd = string.atoi(toplevel.frame(), 0)

</F>

<!-- (the eff-bot guide to) the standard python library:
http://www.pythonware.com/people/fredrik/librarybook.htm
-->




More information about the Python-list mailing list