def callbackFunc(event):
print("New Element Selected")
print(comboExample.current(), comboExample.get())
labelTop = tkinter.Label(root,
text = "选择网络")
labelTop.grid(column=2, row=0)
comboExample = ttk.Combobox(root,
values=[
"January",
"February",
"March",
"April"])
print(dict(comboExample))
comboExample.grid(column=2, row=1)
comboExample.current(1)
comboExample.bind("<<ComboboxSelected>>", callbackFunc)
tk事件绑定单选下拉框
最新推荐文章于 2023-07-06 00:25:44 发布