Discussion:
How to detect the click on the DBGrid scrollbar
(too old to reply)
FrancoJommi
2010-05-18 17:19:41 UTC
Permalink
How do I detect the click on the DBGrid ScrollBar ? I want to show in each
page of the DBGrid only those records corresponding to a specific week and
allow the user to fill a next page with the following week (or go backward).
I thought I would use the scrollbar to allow this, but I cant find a way to
detect the click. Any suggestion ?
FrancoJommi
2010-05-18 19:21:14 UTC
Permalink
Post by FrancoJommi
How do I detect the click on the DBGrid ScrollBar ? I want to show in each
page of the DBGrid only those records corresponding to a specific week and
allow the user to fill a next page with the following week (or go
backward). I thought I would use the scrollbar to allow this, but I cant
find a way to detect the click. Any suggestion ?
I tried using the AfterScroll event of the dataset, but found that if a week
misse records and the page of the DBGrid is empty, the click dpoes not fire
the AfterScroll ...
Back to start ...
BRoberts
2010-05-19 05:34:54 UTC
Permalink
Post by FrancoJommi
How do I detect the click on the DBGrid ScrollBar ? I want to show in each
page of the DBGrid only those records corresponding to a specific week and
allow the user to fill a next page with the following week (or go
backward). I thought I would use the scrollbar to allow this, but I cant
find a way to detect the click. Any suggestion ?
The behavior you want is not standard. Not knowing the details of your
application it seems to me that one could confuse the user if the records of
one week exceeded the screen display area of the grid.

What you might consider is having the grid connected to a query that shows a
single week worth of records. Then have two speed buttons, next and previous
that alter the query to the next and prior week, respectively. Visually you
could make each of the buttons relatively skinny and half the grid height;
positioning them vertically immediately to the right of the grid.
Stark
2010-05-19 08:22:30 UTC
Permalink
Post by BRoberts
Post by FrancoJommi
How do I detect the click on the DBGrid ScrollBar ? I want to show in
each page of the DBGrid only those records corresponding to a specific
week and allow the user to fill a next page with the following week (or
go backward). I thought I would use the scrollbar to allow this, but I
cant find a way to detect the click. Any suggestion ?
The behavior you want is not standard. Not knowing the details of your
application it seems to me that one could confuse the user if the records
of one week exceeded the screen display area of the grid.
What you might consider is having the grid connected to a query that shows
a single week worth of records. Then have two speed buttons, next and
previous that alter the query to the next and prior week, respectively.
Visually you could make each of the buttons relatively skinny and half the
grid height; positioning them vertically immediately to the right of the
grid.
You may be right. I am going to reconsider the idea..

Loading...