Icon in ListView column heading?

T

Tom

Is there ANY way to put an icon/picture in a listview's column heading? I
must say I am disappointed with Microsoft's conversion of the ListView
control to .NET. With the old VB6 one, I was able to sort easily and to put
images into the column heading (i.e. putting an up/down arrow to indicate
the column is sorted). There doesn't seem to be an easy way to do this in
..NET.

Any advice?

Tom
 
H

Herfried K. Wagner [MVP]

Tom,

* "Tom said:
Is there ANY way to put an icon/picture in a listview's column heading? I
must say I am disappointed with Microsoft's conversion of the ListView
control to .NET. With the old VB6 one, I was able to sort easily and to put
images into the column heading (i.e. putting an up/down arrow to indicate
the column is sorted). There doesn't seem to be an easy way to do this in
.NET.

There is no "easy" way, but here is a code written in C# which does what
you want to do:

<http://www.codeproject.com/cs/miscctrl/customheader.asp>
 
T

Tom

Herfried: Hmm.... This is something to look at. Unfortunately, I really need
this in VB rather than C#. I can try to convert it at a later time, I just
don't have the time right now. But thanks for pointing me in the right
direction - at least I know it can be done.

Seems odd that MS didn't include this in the normal ListView - they took
away features from the .NET listview rather than adding thme, I think.

Tom
 
H

Herfried K. Wagner [MVP]

* "Tom said:
Herfried: Hmm.... This is something to look at. Unfortunately, I really need
this in VB rather than C#. I can try to convert it at a later time, I just
don't have the time right now. But thanks for pointing me in the right
direction - at least I know it can be done.

Seems odd that MS didn't include this in the normal ListView - they took
away features from the .NET listview rather than adding thme, I think.

ACK. Some new features will be added in .NET 2.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

Top