1. Faster addLVItem's

Does anyone know how to speed up the adding of item to a list view.  I have
a database of over 30,000 records and it uploads quit nicely... However,
when I go to put that data into a list view, it slows everything down and
takes quite alot of time!

Anyone have any suggestions?

new topic     » topic index » view message » categorize

2. Re: Faster addLVItem's

Try not putting everything in the list.... only the current page, and a 
little above and below. So, when the user scrolls, change the contents of 
the list, and fix the current position of the cursor so it looks all neat. 
Don't know what to do about the scroll bars though... maybe if you made a 
listview the exact size of the selection that you are showing, and make a 
separate scrollbar nestling next to it so that it looks the same as a 
regular listview.
So, just hook up that scrollbar to your page-changing code.

Just don't ask me for an example, and you'll be fine.
=====================================================
.______<-------------------\__
/ _____<--------------------__|===
||_    <-------------------/
\__| Mr Trick


>From: rswiston at hotmail.com
>Reply-To: EUforum at topica.com
>To: EUforum <EUforum at topica.com>
>Subject: Faster addLVItem's
>Date: Tue, 23 Jul 2002 16:40:40 -0600
>
>
>Does anyone know how to speed up the adding of item to a list view.  I have
>a database of over 30,000 records and it uploads quit nicely... However,
>when I go to put that data into a list view, it slows everything down and
>takes quite alot of time!
>
>Anyone have any suggestions?
>
>
>
>

new topic     » goto parent     » topic index » view message » categorize

3. Re: Faster addLVItem's

Hey! :)

There is "virtual listview", which is regular listview with LVS_OWNERDATA
style.
When user scrolls listview you have to tell virtual listview what is value
of item at position it ask you for. Simple. So there is no limit how many
items can be in virtual listview, can be millions of millions, and it will
still work same fast. Somebody really should wrap this, maybe add it to
win32lib. The main reason that it was created it was probably to be used
with database viewers (Access).
I only wish that also virtual treeview existed!
Just go to http://msdn.microsoft.com/ and search for "virtual listview".

This is from MSDN:

VListVw: Virtual ListView Control Sample

Click to open or copy the files for the VListVw sample.

VListVw is a simple example of implementing a virtual ListView common
control in an application. A virtual ListView is not a separate control, but
a standard ListView with the LVS_OWNERDATA style. This example creates a
ListView control that has the LVS_OWNERDATA style and "virtually" holds
100,000 items. The items are never actually added. Instead, the virtual
ListView control is "told" how many items it contains with the
LVM_SETITEMCOUNT message. When an item needs to be drawn, the ListView
control queries the parent window for display information with the
LVN_GETDISPINFO notification.

----- Original Message -----
From: <rswiston at hotmail.com>
To: "EUforum" <EUforum at topica.com>
Sent: Wednesday, July 24, 2002 12:40 AM
Subject: Faster addLVItem's


>
> Does anyone know how to speed up the adding of item to a list view.  I
have
> a database of over 30,000 records and it uploads quit nicely... However,
> when I go to put that data into a list view, it slows everything down and
> takes quite alot of time!
>
> Anyone have any suggestions?
>
>
>
>

new topic     » goto parent     » topic index » view message » categorize

4. Re: Faster addLVItem's

Derek,

I am working on an accounting package (no one likes Qbooks).  The needs are
30+ thousand checks, including deposits, voids, etc.  The reason I use a
list view is because it allows the user to select multiple checks to print,
void, delete or wahtever just like file selections that everyone is used to
and display information aligned nice and neatly..  I tried to use List, but
it did not allow multiple line selections quite so easily, nor does it allow
for perfect alignment when you need to display check no., check date,
description, amount, and balance.

What would you suggest?

----- Original Message -----
From: "Derek Parnell" <Derek.Parnell at SYD.RABOBANK.COM>
To: "EUforum" <EUforum at topica.com>
Sent: Tuesday, July 23, 2002 5:01 PM
Subject: RE: Faster addLVItem's


>
> > -----Original Message-----
> > From: rswiston at hotmail.com [mailto:rswiston at hotmail.com]
> > Sent: Wednesday, 24 July 2002 8:43
> > To: EUforum
> > Subject: Faster addLVItem's
> >
> >
> > Does anyone know how to speed up the adding of item to a list
> > view.  I have
> > a database of over 30,000 records and it uploads quit
> > nicely... However,
> > when I go to put that data into a list view, it slows
> > everything down and
> > takes quite alot of time!
> >
> > Anyone have any suggestions?
>
> Don't use a ListView blink
>
> Seriously though, why are you using a ListView? Specifically, what
features
> of a ListView are you wanting to use?
>
> You might be better off simulating a ListView using simple child window(s)
> and a scrollbar.
>
> I'll try to knock an example if you give me a hint about what you need.
>
> -----------
> Derek.
>
> ==================================================================
>
>
> ==================================================================
>
>
>
>

new topic     » goto parent     » topic index » view message » categorize

5. Re: Faster addLVItem's

----- Original Message -----
From: "Derek Parnell" <Derek.Parnell at SYD.RABOBANK.COM>

> The User Drawn LV as suggested by Tone would also be an idea. I
> requires just a little bit more work than normal, but it might still be
> worth it.

I think it doesn't require a lot of work, you don' actually need to draw
items, you only need to pass it item data when it asks you.
It would look nicer than making you own listview or whatever - that would
look "uglier" for sure! :)

new topic     » goto parent     » topic index » view message » categorize

6. Re: Faster addLVItem's

----- Original Message -----
From: "Tony Steward" <tony at locksdownunder.com>

> Also Virtual or not, is there a way a user can move the columns in a LV.

Style LVS_EX_HEADERDRAGDROP will do that when you create listview.

Tone ©koda

new topic     » goto parent     » topic index » view message » categorize

7. Re: Faster addLVItem's

----- Original Message -----
From: "Tony Steward" <tony at locksdownunder.com>

> Also Virtual or not, is there a way a user can move the columns in a LV.

I'm making correction, you have to do it like this, style
LVS_EX_HEADERDRAGDROP does it:

lvMask = or_all({LVS_EX_FULLROWSELECT, LVS_EX_CHECKBOXES, LVS_EX_GRIDLINES,
LVS_EX_HEADERDRAGDROP })
Void = sendMessage (Selective_reception_listview,
    LVM_SETEXTENDEDLISTVIEWSTYLE, lvMask, lvMask)

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu