tkinter的listbox
tkinter要怎么设置listbox默认选择某个选项? Listbox.active(index) from tkinter import *root = Tk()
lb = Listbox(root)
lb.pack()
for item in ["AAA", "BBB", "CCC", "DDD"]:
lb.insert("end", item)
# 更改 select_set 参数选择默认值
lb.select_set(1)
root.mainloop() qq1151985918 发表于 2021-6-6 11:15
谢谢,成功了
页:
[1]