在tkin中离开messagebox后按下按钮

2024-03-29 06:55:09 发布

您现在位置:Python中文网/ 问答频道 /正文

在绑定到按钮DROP函数时:

def on_click_button_drop(element):

    # ...

    if not db_name:
        print("db name empty")
        messagebox.showinfo("", "db name empty")
        return
# ...
button_drop.bind("<Button-1>", on_click_button_drop)

但是在按下^{中的OK后,按钮左按。。。在

image 1image 2


完整测试代码

^{pr2}$

如何按下按钮


Tags: 函数nameimagedbifondefnot