Re: how do you manage big list boxes?

From: Erick Gallesio <eg_at_unice.fr>
Date: Mon, 22 Jun 1998 09:48:10 +0200 (CEST)

Walter C. Pelissero writes:
> Scroll-listboxes are good enough while you are working with a number
> of items ranging from 0 to (maybe) 1000. But what do you use to
> manage more items in an efficent way (from the point of view of
> space)?
>
> An example where a Scroll-listbox can't be used efficently could be a
> browser of database records. You must load all records (at least some
> column) if you want to browse them with the traditional Scroll-listbox.
>
> The natural answer seems something like a new Scroll-listbox with
> external functions to fetch and locate items (rows, records, lines) as
> needed.
>
> Since the problem seems to me rather common I hesitate starting
> thinking of a solution.
>
> Any suggestion?

Not really a suggestion but the Demo which is called "tkcolor.stklos"
do something similar (i.e. it avoids to allocate all the colors
defined in the rgb.txt color databas and restrict tself to the values
currently displayed. However this is not done with a listbox but with
a canvas.

Otherwise, we can imagine that the basic STk listbox calls a kind of
"hook" each time it change the content of the display. Better than a
hook it could be a virtual event, which could be grabbed if
necessary. It seems a priori that we only need to wrap all the calls
to (w 'yview 'scroll ...) and generate the virtual event in this
case. In listbox.stk, there are ony 4 usage of "yview" (for key
mainly) and 1 usage of "yview" in Srollbox.stklos. BTW, you also have
to grab the <Configure> Event to be complete.

This extensions seems good and I would like to add it to STk, but I
have actually virtually no time (this is the end of the scholar year
and I have mountains of exams to correct) and will not have some
before a couple of weeks :-<

Tell me if you find my response too evasive.


                -- Erick
Received on Mon Jun 22 1998 - 09:47:50 CEST

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST