Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to custom draw a ListViewGroup

I am using the System.Windows.Forms.ListView control on .NET 2.0. I know I can set the OwnerDraw property on the ListView to true and then override OnDrawItem to custom draw my ListViewItems. I can also override OnDrawColumnHeader and OnDrawSubItem to draw those components.

However, there is no equivalent "OnDrawGroup" method to override if I want to custom draw my ListViewGroups.

I took a brief look at the messages this control uses and I see there are WM_CUSTOMDRAW and CDDS_ITEMPREPAINT notifications, but I'm wondering is there a way if I handle these native messages to custom draw my ListViewGroups?

like image 830
jameswelle Avatar asked Nov 20 '10 05:11

jameswelle


1 Answers

I don't believe this is possible using the built-in mechanism. I think you'd have to drawing everything yourself.

like image 62
Joel Lucsy Avatar answered Oct 01 '22 20:10

Joel Lucsy