Re: Explanation of ListView in virtual mode

Daniel Barla-Szabo <[email protected]> Tue, 7 Aug 2007 16:31:17 +0200
Newsgroups gmane.comp.windows.devel.dotnet.winforms
Message-ID <002801c7d8ff$a1133880$e339a980$@com>
Hi,

> The event handler that sends a ListViewItem

I'm guessing you are referring to the RetrieveVirtualItem event?

I threw together a quick test app here, and I'm seeing similar things to
you...  Perhaps even more strange is that if I hover my mouse over an item,
the event just keeps firing.  Perhaps it fires when Paint() is triggered?

This might seem like a cheesy opt-out, but do you predict that your ListView
will grow in number of records?  64 rows by 20 columns should perform OK
using VirtualMode = false, or am I wrong?  Depending on your exact
situation, it might be better to use the standard setup.

Regards,

Daniel.


-----Original Message-----
From: Discussion forum for developers using Windows Forms to build apps and
controls [mailto:[email protected]] On Behalf Of Richard
Kucia
Sent: 07 August 2007 03:58 PM
To: [email protected]
Subject: [DOTNET-WINFORMS] Explanation of ListView in virtual mode

I am experimenting with the ListView in virtual mode. I have data for 64
rows and a visible area for 20 rows. The ListView has 9 columns.

The event handler that sends a ListViewItem includes a Debug.Writeline
statement, which I included just to see how .Net is invoking the event
handler. To my surprise, there's a very definite pattern. It invokes the
handler 12 consecutive times for item #0, then 12 consecutive times for item
#1, ..., down to item #19.

What's it doing? Why can't it just accept the item I returned upon the first
invocation?

Rick Kucia

No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.476 / Virus Database: 269.11.8/940 - Release Date: 2007/08/06
04:53 PM


No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.476 / Virus Database: 269.11.8/940 - Release Date: 2007/08/06
04:53 PM