Python GUI编程(Tkinter)13、Listbox控件下

import tkinter

win = tkinter.Tk()
win.title("sunck")
win.geometry("400x400+200+20")

# MULTIPLE 支持多选
lb = tkinter.Listbox(win, selectmode=tkinter.MULTIPLE)
lb.pack()
for item in ["good", "nice", "handsome", "vg", "vn"]:
lb.insert(tkinter.END, item)

win.mainloop()
posted @ 2020-05-19 16:05  i勤能补拙  阅读(252)  评论(0编辑  收藏  举报