标签:for 支持 main pac box pack title multi 中控
import tkinter
win = tkinter.Tk()
win.title("Listbox列表框(单击多选)")
win.geometry("800x600+600+100")
#MULTIPLE 支持不用按shift和ctrl可以多选
lb=tkinter.Listbox(win,selectmode=tkinter.MULTIPLE)
lb.pack()
for item in["good","nice","handsome","very good","verynice"]:
lb.insert(tkinter.END,item)
win.mainloop()
Python中tkinter中控件的使用(6.Listbox列表框(单击多选))
标签:for 支持 main pac box pack title multi 中控
原文地址:https://www.cnblogs.com/zlong123/p/10498119.html