Changing ListView Column Header Graphic

  • Thread starter Thread starter djohnson
  • Start date Start date
D

djohnson

My listview will sort but I would like the column headers to contain up
or down arrows to indicate the sort direction. I have an image on the
column header, but I'm having a heck of a time figuring out how to
programmatically change it. I can't find the property. Someone
suggested it is impossible to change the column header index in .Net
and that native Win32 API calls have to be used. Is this true? Isn't
there a more straightforward way in .Net?
 
djohnson said:
My listview will sort but I would like the column headers to contain up
or down arrows to indicate the sort direction. I have an image on the
column header, but I'm having a heck of a time figuring out how to
programmatically change it.

So how did you get the image there in the first place if you didn't do it
programatically?

I can't find the property. Someone
suggested it is impossible to change the column header index in .Net
and that native Win32 API calls have to be used. Is this true? Isn't
there a more straightforward way in .Net?

Have you tried ColumnHeader.ImageIndex?

/claes
 
No I hadn't but it seems to be working fine. I'm new to this and
failed to notice member variables for my columns were automatically
created, so all I had to do in this case, ColumnName.ImageIndex=4;.
Much easier than I expected. Thanks.
 
No I hadn't but it seems to be working fine. I'm new to this and
failed to notice member variables for my columns were automatically
created, so all I had to do in this case, ColumnName.ImageIndex=4;.
Much easier than I expected. Thanks.
 
Back
Top