Reputation: 503
I am making a Listbox
which should contain lines from two lists.
Here is my rough draft:
LISTBOX = Listbox(master)
for line in LIST1:
for lin in LIST2:
LISTBOX.insert(END, line)
LISTBOX.insert(END, lin)
Now, I want the lines from LIST1
to be marked (highlighted in blue) automatically in the listbox.
Is this possible?
Upvotes: 1
Views: 2346
Reputation: 386020
You can do something like this:
LISTBOX.insert(END, line)
LISTBOX.itemconfigure(END, background="blue")
Upvotes: 2