Tkinter OSX and "lift"

Miki miki.tebeka at gmail.com
Fri Feb 22 12:03:19 EST 2008


Hello Eric,

> >>> Tk.lift doesn't seem to work on OSX (Python 2.5.1).

> There is a trick that sometimes works even for interpreted application:
>
> import Tkinter as tk
> root = tk.Tk()
> root.withdraw()
> # Code building the window...
> root.lift()
> root.deiconify()
> root.mainloop()
>
> This sometimes forces the window to be top-most. If this doesn't work, you  
> can also try:
>
> import Tkinter as tk
> root = tk.Tk()
> root.withdraw()
> # Code building the window...
> root.lift()
> root.after_idle(root.deiconify)
> root.mainloop()
>
> This was a trick that had to be done on Windows a few years back to force  
> the main window to be created on top of this others. It deosn't seem to be  
> needed anymore now, but maybe the trick can be used on a Mac... Don't know  
> if this will work the same, though...
Sadly, both of them didn't work.

Thanks.
--
Miki <miki.tebeka at gmail.com>
http://pythonwise.blogspot.com



More information about the Python-list mailing list