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

后端 未结 7 940
北恋
北恋 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:03

    I modified the above solution and these 2 lines work for me on OSX. It brings the window to the front, but without making the window behave as Always on Top.

    root.call('wm', 'attributes', '.', '-topmost', True)
    root.after_idle(root.call, 'wm', 'attributes', '.', '-topmost', False)
    

提交回复
热议问题