How to do OWNERDATA in Listview with C#

  • Thread starter Thread starter Jeff Lindholm
  • Start date Start date
J

Jeff Lindholm

In the old MFC days you could create a ListView with the LVS_OWNERDATA style
and you would be asked to provide the item to be drawn as the list view
needed it. This way you could have lots if items in the listview but none of
them would exist as data in the list view.

Any way to do this in C# and windows forms? Yes I know you can do owner
draw, but this was not owner draw all it did is provide the data to be drawn
as needed and you did not need to do any drawing etc.

Thanks
 
Ok if Tag holds my data, how does the listview know what to draw? How does
it ask me for the information to draw (I know I can overload draw item and
do it all myself, that is not what I want, nor is it what you would do with
the old OWNERDATA method)
 
I ended up doing all the drawing manually using the text and location data
from each item. The real reason I had to do this was to enable double
buffering, but it sure would have been nice to somehow just copy what the
listview would draw normally into the buffer.
 
Back
Top