Can a listbox item be highlighted based on a condition?

Yes; this should be doable with the list cell renderer. Here is an example I developed for simply changing the dropdown background color independent of the component color

Looking at the code in that example. The part to modify for your use case would be this:

if cellHasFocus or isSelected:
	component.background = event.source.selectionBackground
else:
	component.background = Color.black

Just add some elif statements to for highlighting values greater than zero or for changing fonts. Note the variables that are passed into renderer component that can be used in your scripting:

(self, list, value, index, isSelected, cellHasFocus)
2 Likes