1

Possible Duplicate:
Make Tkinter jump to the front

I am seeking a solution to put in front plan a Tkinter Window ... But when I launch other programs, they come in first plan, hiding my window.

It's just about creating a Window that gonna be put always in the first plan

I've tried some tricks but nothing works ! Thx !

EDIT:

from Tkinter import *

def quit():
    fen = Toplevel(root)
    fen.grab_set()
    fen.focus_set()
    b = Button(fen, text = "Ok", command = root.quit).pack()

root = Tk()
bouton = Button(root, text = "Quit", command=quit).pack()
root.mainloop()

But not working ...

Community
  • 1
  • 1
Carto_
  • 577
  • 8
  • 28

1 Answers1

3

Try using the topmost parmameter to wm_attributes. For example:

fen.wm_attributes("-topmost", True)

This may not work on all platforms; it's somewhat dependent on the window manager you're using.

Bryan Oakley
  • 370,779
  • 53
  • 539
  • 685
  • Thank you very much ! That's exactly what I was looking for ! Works like a charm on my OS X ! – Carto_ Oct 15 '12 at 14:51