第27259题 单选题
在使用Python的tkinter库开发GUI程序时,若要创建一个显示文本为"确定"且点击时触发自定义回调函数on_click的按钮,下列代码片段中参数设置正确的是哪一项?
A

tkinter.Button(root, text="确定", command=on_click)

B

tkinter.Button(root, title="确定", command=on_click)

C

tkinter.Button(root, text="确定", bind=on_click)

D

tkinter.Button(root, label="确定", func=on_click)

程序运行统计
暂无判题统计
提交0次 正确率0.00%
答案解析