Alternating background colours in Listview widget

Has anyone found a way to create alternating background colours in listviews? I can see that the list index number can be selected for a comparison, but how to compare that with a function to detect even or odd number?

5
2 replies