Board index » delphi » D2 DBGrid quirk?

D2 DBGrid quirk?

Hello all,
  I've got aprogram written in D2 Developer consisting of a DBGrid
accessing a dBase file using Apollo libraries for NTX index file
access.  The data file has 26 records.  When clicking on the scrollbar
on the right side of the grid, the 'position marker' (the box you can
drag within the scrollbar) doesn't move in direct relation to the
location of the record pointer on the screen.  The quirk: If I have a
screen size that makes the grid display less than 12 or so records at
a time, and click on the lower portion of the scrollbar to move the
position marker down, the marker will stop at the center of the grid
and stay there for one more mouse click before moving to the bottom of
the scrollbar.  It seems that the position marker should move only a
third or a fourth of the total height of the scrollbar instead of
moving only between the top to the center, then not move, then move
from the center to the bottom.  I apologize for not managing to make
this explanation more simple to understand.  Is this a known
'feature'?  If you know of a way to correct it (other than maximizing
the screen to show all records contained in the data file), please let
me know.  I have D3 and D4 also, but this is an old app and it needs
to use the Apollo library for D2 to get the the NTX index
compatibility.
Any help is appreciated,
Myron
--------------------------------------------------------------------------
C. Myron Ware   Senior Prog/Analyst, CNE
http://www.geocities.com/Colosseum/1370/
 

Re:D2 DBGrid quirk?


C. Myron Ware (sun...@usa.net) wrote:
:   I've got aprogram written in D2 Developer consisting of a DBGrid
: accessing a dBase file using Apollo libraries for NTX index file
: access.  The data file has 26 records.  When clicking on the scrollbar
: on the right side of the grid, the 'position marker' (the box you can
: drag within the scrollbar) doesn't move in direct relation to the
: location of the record pointer on the screen.  The quirk: If I have a
: screen size that makes the grid display less than 12 or so records at
: a time, and click on the lower portion of the scrollbar to move the
: position marker down, the marker will stop at the center of the grid
: and stay there for one more mouse click before moving to the bottom of
: the scrollbar.  It seems that the position marker should move only a
: third or a fourth of the total height of the scrollbar instead of
: moving only between the top to the center, then not move, then move
: from the center to the bottom.  I apologize for not managing to make
: this explanation more simple to understand.  Is this a known
: 'feature'?  If you know of a way to correct it (other than maximizing
: the screen to show all records contained in the data file), please let
: me know.  I have D3 and D4 also, but this is an old app and it needs
: to use the Apollo library for D2 to get the the NTX index
: compatibility.

If your data source is a query, or a filtered table, this
is normal behavior.  To the best of my knowledge, the behavior
would not change in D3 or D4.  This is done because it was
considered to be too time-intensive for the application to
constantly be gathering information on how many records are
currently in the dataset.
--
============================================================
Rick Carter   carte...@email.uc.edu   rcar...@tso.cin.ix.net
============================================================

Re:D2 DBGrid quirk?


Myron,

This is actually behaving as designed...

The problem is that the DBGrid has to work with various database
types, and not all of them support the ability to determine the
'logical' position in a data set.

By 'logical', I mean the position of the record to other records
as it appears when viewing them with a controlling index, as
opposed to the 'physical' position in the database.

Borland decided that, in order to be able to use the DBGrid with
all possible database engines, they would support three positions
for the thumb on the scrollbar: the top (at the beginning of the
file), the bottom (at the end of the file) and the center (somewhere
in between).

Some third party grid replacements (eg., Luxent's own DBPower,
since you're using Apollo) support the correct proportional
positioning of the thumb with databases that support it. Delphi
4 also has the ability to handle this for Paradox and dBase
tables, IIRC - I'm not sure about this one, though, as I never
use the BDE...

HTH

Ken
--
Ken White

Clipper Functions for Delphi
http://members.aol.com/clipfunc

Quote
"C. Myron Ware" wrote:

> Hello all,
>   I've got aprogram written in D2 Developer consisting of a DBGrid
> accessing a dBase file using Apollo libraries for NTX index file
> access.  The data file has 26 records.  When clicking on the scrollbar
> on the right side of the grid, the 'position marker' (the box you can
> drag within the scrollbar) doesn't move in direct relation to the
> location of the record pointer on the screen.  The quirk: If I have a
> screen size that makes the grid display less than 12 or so records at
> a time, and click on the lower portion of the scrollbar to move the
> position marker down, the marker will stop at the center of the grid
> and stay there for one more mouse click before moving to the bottom of
> the scrollbar.  It seems that the position marker should move only a
> third or a fourth of the total height of the scrollbar instead of
> moving only between the top to the center, then not move, then move
> from the center to the bottom.  I apologize for not managing to make
> this explanation more simple to understand.  Is this a known
> 'feature'?  If you know of a way to correct it (other than maximizing
> the screen to show all records contained in the data file), please let
> me know.  I have D3 and D4 also, but this is an old app and it needs
> to use the Apollo library for D2 to get the the NTX index
> compatibility.
> Any help is appreciated,
> Myron
> --------------------------------------------------------------------------
> C. Myron Ware   Senior Prog/Analyst, CNE
> http://www.geocities.com/Colosseum/1370/

Other Threads