Python中tkinter中控件的使用(6.Listbox列表框(单击多选))


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()
上一篇:POJ 1426 Find The Multiple


下一篇:QT编译错误: multiple definition of `qMain(int, char**)'