Lift Tkinter window on Win32
joonas at olen.to
Tue Sep 18 17:41:31 CEST 2001
> Hi, everybody!
> I have encountered a peculiar problem while trying to do as simple thing as
> getting a Tkinter window to be the foreground window.
> I'm running Python 1.5.2 on Windows 98 with Tcl/Tk 8.0.5
> I started with an obvious wnd.lift() (or tkraise), which does not work (!).
> It only raises the wnd over the other Tkinter windows, not other application
> Any ideas why?
> Frustrated, I decided to play dirty and call
> win32gui.SetForegroundWindow( atoi(wnd.frame()) )
> which didnt work either.
> Probing further, I wrote a piece of C code, which did SetForegroundWindow on
> the Tkinter window in question - IT WORKS!
> However, if I compile the very same piece of C code into Python extension module
> and call it from within Python code - IT DOESN'T WORK!
> Can anyone please shed some light on this.
I am not sure about this, but this might work
More information about the Python-list