In reference to Is it possible to colour a specific item in a Listbox widget? Is it possible to change the bg colour based on the data being held in the list.
For example:
In the list names there are several values, some positive, others negative. I want to change their background colour based on if they are positive or negative.
if names > 0 :
diffbox.itemconfig(bg='red')
if names < 0 :
diffbox.itemconfig(bg='green')
diffbox.insert(END, names)