Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 1768 - Lazy scrollbars
Summary: Lazy scrollbars
Status: IN_PROGRESS
Alias: None
Product: TeeGrid for Delphi
Classification: Unclassified
Component: Grid (show other bugs)
Version: unspecified
Hardware: All All
: --- enhancement
Target Milestone: ---
Assignee: david berneda
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-07 09:56 EST by david berneda
Modified: 2017-02-21 11:44 EST (History)
0 users

See Also:
Chart Series: ---
Delphi / C++ Builder RAD IDE Version:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description david berneda 2017-02-07 09:56:51 EST
Scrollbars currently operate in "perfect" mode, that is, the scrollbar needs to know the maximum value, the current value and the size units the scrollbar thumb represents.

A new "lazy" mode is needed to support for example buffered TDataSet in the near future.

"Lazy" mode is used in VCL DBGrid vertical scrollbar. In this mode, the maximum number of rows (RecordCount) is not necessarily known. 

Only the current value (current selected row) and the thumb size (the number of rows that can be displayed) are known.

The scrollbar thumb is just set to an arbritrary size (eg: a third of the scrollbar size), and clicking the scrollbar goes up and down only when they are relatively close to 0 (dataset BOF) or max (dataset EOF).

A proposal to implement lazy mode is:

1) A new TVirtualData.ScrollMode enum (for example: Automatic, Lazy) so TVirtualDBData can return Lazy by default.

2) In lazy mode, xxxTee.Control.pas should never call GetMaxBottom (or GetMaxRight for horizontal scrollbars)

3) Scrolling down to the end of the scrollbar should just keep advancing "next" number of rows while possible, as we don't know the "max" bottom value.

Note: Horizontal "lazy" mode is not yet necessary (column widths are always calculated so the GetMaxRight function is always correct)
Comment 1 david berneda 2017-02-21 11:44:21 EST
Partial work done. 

Scrollbars can now be set to "Lazy" mode, but still handling scrolling from / to grid <--> vertical scrollbar is not yet finished.

>>2) In lazy mode, xxxTee.Control.pas should never call GetMaxBottom

Done.

>>TVirtualDBData can return Lazy by default

Still returning "perfect" mode, until scrollbar work is finished. 

Some datasets (eg: BDE Paradox tables) can work in perfect mode.
Also FireDAC datasets with FetchOptions.RecordCountMode = Total can also work in perfect mode.