🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.ms-windows.programmer.misc
Article #1

Re: **Huge data listbox

#1
From: Bill Whedon
Date: Tue, 27 Oct 1992 04:59
44 lines
2757 bytes
In article <1992Oct26.183209.14385@tamsun.tamu.edu> c2s4027@tamsun.tamu.edu (Cedric Sims) writes:
>In article <D88-JWA.92Oct26173144@hemul.nada.kth.se> d88-jwa@hemul.nada.kth.se (Jon Wtte) writes:
>>> c2s4027@tamsun.tamu.edu (Cedric Sims) writes:
>>
>>   I need some assistance. I need to create a list box that will hold
>>   about 4,000 items (character strings), each item occupying ~60 bytes.
>>   Of course, the standard listbox control can't handle that much data
>>   (LB_ADDSTRING begins to fail).
>>
>>
>>Warning!!! This will be the User Interface From Hell(tm)!!!

<obvious explanation deleted>

>
>This is what my users want!  A search is performed and it generates a list.

Do your users really comprehend the implications of a 4000-item listbox?  It
may be that it will only happen once in a great while, but, Murphy being who
(s)he is, it _will_ happen.  Maybe you better have a go at your Human Factors
people there, to explain to your users why another approach would be better. 

>Most of the time, only 10-20 items are found, but it is possible that a user
>can do a search that will generate >4000 items. I just can't work around that.
>In addition, the data must be ordered linearly (sound like a listbox to you?)
>
>Sorry, but re-thinking my interface is not an option. Though this listbox is
>a minor portion, it is integral to the entire system and I must have the
>ability to create a list with >4000 elements. No if's, and's, or but's.

Fine, create that list, but manage the listbox yourself.  Set it up with an
array of reasonable size (say, 100 items), and fill it from a linked list of
responses.  You keep track of where the selection bar is, and refill the 
array as required.

Another approach might be to give your users another listbox containing an
alphabetized (or enumerated) index to the big array.  In general, it is a good
bet that your users don't really want a hostile interface, and you can give
them a better one which they will _really_ like with just a bit more thought.

Good luck!
Bill Whedon   whedon@netcom.com
-- 
-- Charter member of Mutants for Nuclear Power --
Technical Details
Message-ID: <1992Oct27.045900.22612@netcom.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!agate!ames!decwrl!decwrl!netcomsv!netcom.com!whedon
References: <1992Oct26.130951.19574@tamsun.tamu.edu> <D88-JWA.92Oct26173144@hemul.nada.kth.se> <1992Oct26.183209.14385@tamsun.tamu.edu>

Show Full Headers
Complete Article Headers
Newsgroups: comp.os.ms-windows.programmer.misc,comp.windows.ms.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!agate!ames!decwrl!decwrl!netcomsv!netcom.com!whedon
From: whedon@netcom.com (Bill Whedon)
Subject: Re: **Huge data listbox
Message-ID: <1992Oct27.045900.22612@netcom.com>
Organization: Netcom - Online Communication Services  (408 241-9760 guest) 
References: <1992Oct26.130951.19574@tamsun.tamu.edu> <D88-JWA.92Oct26173144@hemul.nada.kth.se> <1992Oct26.183209.14385@tamsun.tamu.edu>
Date: Tue, 27 Oct 1992 04:59:00 GMT
Lines: 44