 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Chris Luck Guest
|
Posted: Tue Nov 25, 2003 5:06 am Post subject: Re: strange behavior of DBGrid and mouse wheel in Delphi 5 |
|
|
"Marek" <mark*NOSPAM*@tradition.ca> wrote
| Quote: | When I use MouseWheel on TDBGrid control, it moves
record selection but it does not change current record.
snip |
See if this thread is any help -
http://tinyurl.com/n2p3
--
Regards,
Chris Luck
|
|
| Back to top |
|
 |
Marek Guest
|
Posted: Tue Nov 25, 2003 5:35 am Post subject: strange behavior of DBGrid and mouse wheel in Delphi 5 |
|
|
When I use MouseWheel on TDBGrid control, it moves record selection but it
does not change current record.
You can see that when you are using "indicator" column (indicator stays on
one row while selection goes to the other).
If my DBGrid works in "Master-Detail" model, the relation is broken as
moving selection does not change the current record.
In addition, the selection moves in current visible range of rows, not on
entire grid.
Could anybody explain this and ,perhaps, point out a solution ?
Thank you.
|
|
| Back to top |
|
 |
Lester Hanger Guest
|
Posted: Sun Nov 30, 2003 9:21 pm Post subject: Re: strange behavior of DBGrid and mouse wheel in Delphi 5 |
|
|
Marek <mark*NOSPAM*@tradition.ca> wrote
| Quote: | When I use MouseWheel on TDBGrid control, it moves record selection but it
does not change current record.
You can see that when you are using "indicator" column (indicator stays on
one row while selection goes to the other).
If my DBGrid works in "Master-Detail" model, the relation is broken as
moving selection does not change the current record.
In addition, the selection moves in current visible range of rows, not on
entire grid.
Could anybody explain this and ,perhaps, point out a solution ?
Thank you.
|
I use the following in a TDBGrid descendant component:
{--- fix MouseWheel to allow scrolling of grid ---}
procedure TRDBGrid.WMMouseWheel(var Msg: TWMMouseWheel);
begin
if (DataLink <> nil) AND (DataLink.Active) then try
DataLink.DataSet.MoveBy(-Msg.WheelDelta div 120);
except;
end;
end; {WMMouseWheel}
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|