How to put a tkinter window on top of the others?

后端 未结 7 941
北恋
北恋 2020-12-02 23:23

I\'m using Python 2 with Tkinter and PyObjC, and then I\'m using py2app.

The program is working fine, but the window starts a

7条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-03 00:18

    I know this is an old question but I found it weird that no one came up with the simple solution I had,

    app = SampleApp()
    
    app.attributes('-topmost', True)
    app.update()
    app.attributes('-topmost', False)
    
    app.mainloop()
    

提交回复
热议问题