SQL/filters/TTrackBar problem (long rant)

Hi all.

I've a D4 app that's distributed on a CD (read-only fs). ATM I'm using
BDE but I plan to move to something like DBISAM so that users don't
have to install anything to run the app. That means I don't wanna use
3rd-party OCXes and things like DbiMakePermanent, too.

I've a db of 2 (paradox) tables: main table and search table.
Main table contains info about minerals; that's shown to the user.
Search table lists all possible attribute values for the mineral, it's
used for searching. Search table has multiple records for a mineral,
eg same mineral can be colorless, brown, yellow etc.

String values from search table are loaded into combos on search
form. Combo's OnChange reads selected values and cats them into sql
query, eg. "select distinct mineral from SearchTable where attr=val
[and attr2=val2 ...]". Query result is shown in a list box -- list
of minearls that satisfy the criteria. Then I run "select distinct
attr from SearchTable where ..." using the same "where" clause to
re-load lists in the combos. That removes values that don't apply
to current subset of minerals (kinda incremental search).

Q1: running multiple queries is obviously inefficient. It'd make
sense to set a filter on SearchTable and to fetch lists from already
filtered dataset. The problem is eliminating duplicates from the list.
How can I do that with Filter property? Any other suggestions?

Q2 (the bad one): unfortunately some of the attributes are reals and
user can select an interval of those. I'm using TTrackBars for these
and I'm having lots of problems with TTrackBar.

Main problem is that multiple OnChange events are generated when you
move the slider; every one of them runs all those queries. That also
happens when you select a range (aside: MS slider OCX has AllowRange
or something property that turns range selection on/off; I coudn't find
anything of the sort in TTrackBar -- am I missing something?). In
addition, I have to map integer TrackBar.Position to a real and the
scale is not exactly linear. Fun, eh?

Second problem is restricting the interval in TTrackBar (as with
lists in the combos). Slider is initially at 0 and that particular
attribute is excluded from "where" clause. When I select a value in
one of the combos, that restricts valid range to eg. 10..50. If I move
the slider now, OnChange event is generated for every slider position,
all those queries are re-run and they return empty result sets for
every slider position < 10. Bummer. I'd like to show the user what's
the valid range - as with combos. When I try to set SelStart/SelEnd
programmaticaly, same snafu happens: multiple OnChange events...
Since I've more than one slider, I can possibly get them to recursively
change each other... major snafu.

Finally, _the_question. Can you suggest a native vcl component that
1) allows selection of interval of [pref. real] values
2) does not generate OnChange event until user's done selecting
3) is similar to TTrackBar in terms of UI: I don't want to have users
   type numbers into edit boxes
4) pref. free or shareware and comes with the source code.

Any other ideas/suggestions are welcome.
Pls cc to me when replying to ng.
There's no such thing as an innocent user
        -- Dark Avenger, in a Wired interview
{*word*216}le-{*word*216}le, 43 Confusion 3166, 172:3:0 (1)