How to do OWNERDATA in Listview with C#

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
 
J

Jeff Lindholm

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)
 
G

Guest

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.
 

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