How do I alternate rows with different textbackcolor in a ListView?

Started by Airam, June 09, 2009, 02:48:56 PM

Previous topic - Next topic

Airam

How do I alternate rows with different textbackcolor in a ListView?
If I use:

RGB 0, 255, 255
Invoke SendMessage, lvi.iItem, LVM_SETTEXTBKCOLOR, 0, Eax

I'll change all rows textbackcolor, but I only want to change the even rows or the odd rows.

Any ideas??
Thanks in advance!!!!!

donkey

You would use an owner drawn listview, I have an example on my website, though it doesn't alternate the background colors you can deduce how its done simply enough from the example.

http://www.quickersoft.com/donkey/files/CustomListView.zip
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable