R – How to set a ListViewSubItem BackColor in Windows Mobile

compact-frameworkpinvokewindows-mobilewinforms

I'd like to change the BackgroundColor of a ListViewSubItem in a ListView in Windows Mobile. I'm using the Compact Framework ListView, whose ListViewItems only allow setting the BackColor on the entire row, which I don't want.

I have two questions:

  1. Is this possible?
  2. If this is possible, I know I have to P/Invoke to get this to work (because ListView.ListViewSubItem only offers a Text property), or send the right Windows message. What's the right function to call, or the right message to send?

Even just a pointer in the right direction would be appreciated.

Best Answer

Christian Helle shows how to custom draw CF ListViews here.

Related Topic