ListView Column COlor

  • Thread starter Thread starter Lespaul36
  • Start date Start date
L

Lespaul36

I want to change the color of certain columns in my listview. I know it can
be done using customdraw, but I haven't found much code to help with it.
Any help in vb.net would be great.

TIA
 
Lespaul36 said:
I want to change the color of certain columns in my listview. I know it can
be done using customdraw, but I haven't found much code to help with it.
Any help in vb.net would be great.

Can you be more specific about what you mean by the color of the column? If
you are looking to change the color of the items in the column, ListViewItem
has ForeColor and BackColor properties that you can set.

If you want to change the color of the column header I believe that would be
a custom draw situation, but I am not experienced enough with that to provide
help.

-Brian
 
I want to have a gray rectangle on the background such as the one in Windows
Explorer when a column header is clicked.
 
Figured it out
SendMessage(lstView.Handle, LVM_SETSELECTEDCOLUMN, ColumnIndex, 0)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top