I suspected as much. As it happens, I have a the Express copy of C# at home.
I appreciate this is not a 2.0 forum, but do you have any info on how this
could be done in 2.0? Or any useful links.
Cheers
Dan
Well, I haven't tried ownerdrawing ListView items yet, but the principles should be the same as ownerdrawing any other list.
I suppose you will need several calls to Graphics.DrawString, one for each time the color changes and to get the correct position for the next bit of text you will need to use Graphics.MeasureCharacterRanges.
This sample covers the basics of it. You probably don't need to use MeasureItem.
You should note that for ListView you use the DrawListViewItemEventHandler/Args and OwnerDraw needs to be set to true.
> I suspected as much. As it happens, I have a the Express copy of C# at home.
> I appreciate this is not a 2.0 forum, but do you have any info on how this
[quoted text clipped - 35 lines]
>> Happy coding!
>> Morten Wennevik [C# MVP]

Signature
Happy coding!
Morten Wennevik [C# MVP]
Dan Kelley - 13 May 2005 12:41 GMT
Thanks Morten. I will take a look.
Dan
> Well, I haven't tried ownerdrawing ListView items yet, but the principles should be the same as ownerdrawing any other list.
>
[quoted text clipped - 42 lines]
> >> Happy coding!
> >> Morten Wennevik [C# MVP]