在绑定到按钮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:
要达到预期效果,请使用
<ButtonRelease-1>
事件,而不是<Button-1>
事件:此外,您的
^{pr2}$return
和pass
语句是多余的,这就足够了:相关问题 更多 >
编程相关推荐