Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在制作一个Listbox应该包含两个列表中的行。
Listbox
这是我的草稿:
LISTBOX = Listbox(master) for line in LIST1: for lin in LIST2: LISTBOX.insert(END, line) LISTBOX.insert(END, lin)
现在,我希望LIST1在列表框中自动标记来自的行(以蓝色突出显示)。这可能吗?
LIST1
你可以这样做:
LISTBOX.insert(END, line) LISTBOX.itemconfigure(END, background="blue")