开发者

Toplevel window in Python keeps appearing under the root window

开发者 https://www.devze.com 2023-02-22 19:24 出处:网络
I have a toplevel window that keeps appear underneath the root window, which is pretty annoying. Any idea how to make sure that the toplevel gets the focus when the function is called?

I have a toplevel window that keeps appear underneath the root window, which is pretty annoying. Any idea how to make sure that the toplevel gets the focus when the function is called?

def setup(self):开发者_高级运维
    self.setup_step = 1
    setup_window = Toplevel(self)
    setup_window.config(bg = "#000000", height = "600",  width = "850")
    setup_window.title("RoastMaster Setup")
    setup_window.geometry("800x600")


You can try by making the toplevel window transient.


You might try raising it and giving it focus. It could be that you window manager wants the window with focus to always be on top.

0

精彩评论

暂无评论...
验证码 换一张
取 消