.Net Listview Woes

M

Michael.Suarez

Is it me, or does it seem like they put no effort into creating the
listview control in .Net.
From what i can see, it is actually LESS powerful than the vb6
listview.

A few gripes I have with .Net listview that aren't present in vb6:

-Inability to set tooltiptext of subitems (without the use of a very
inconveniant work around).
-Inability to display images in subitems (without using the windows api
to get the extended listview.... I'm in .NET!!!!... why do i have to
use windows API for something so easily done in vb6!?!)
-Loading large listviews takes MUCH longer in .NET than it does in vb6.
Therefore I have no chioce but to use virtualmode.

But virtual listviews have their own set of problems:
-Can't use extended listview to assign images to subitems when in
virtual mode (or at least I haven't figured out how).
-Suppose I have a listviewitem selected on a very large listview.
Something changes and I need to refresh the listview, but i immediately
want to re-select that same item. When not in virtual mode, this is
very simple... but when in virtual mode, how do you do this? I have
this crazy workaround to do it, but it is by no means a quality
solution.

Lets also not forget what i pain it is now to sort a column compared to
what it used to be.

If anyone has any suggestions, explanations of why the .net listview
blows so much, links to good articles, or 3rd party listviews that
address these issues, I would be very interested in some feedback.

Thanks,
Mike
 
B

Bob Powell [MVP]

Everything the Win32 listview can do, the .NET ListView can do, thay just
didn't expose the finctionality in the .NET wrapper. You can override the
control and add to the WndProc and create properties that send messages to
the underlying control. I did a fully custom drawn listview in this manner a
while back. I'll see if I can drag up some code to get you started. It'll
have to be at the weekend because I'm mobile at the moment and don't have my
library of projects with me.


--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
 
M

Michael.Suarez

That would really really be helpful and greatly appreciated.

It's just odd to me that they wouldn't expose functionality in .Net
that's included in vb6.. i mean dont they want to encourage people to
convert their projects from vb6 to .net? why make it such a hassle?

I am aware that you can use WndProc and SendMessage to extend the
control. I found a few examples of this from a google search. However,
my problem was in using the extended listview features in conjunction
with virtualmode.

I dont know if your examples utilize the virtualmode feature, but
either way, any code examples that you can easily provide would be very
appreciated.

Thanks,
Mike
 
M

Michael.Suarez

Hi Bob,

Just wondering if you were able to easily locate that code or not.

Thanks,
Mike
 

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