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 ...

2
  • 1
    "I've tried some tricks, but nothing works" -- What tricks have you tried? Commented Oct 15, 2012 at 13:21
  • When you say "front plan" do you mean "front plane" (ie: it should be above all other windows)? Commented Oct 15, 2012 at 13:53

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you very much ! That's exactly what I was looking for ! Works like a charm on my OS X !

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.