You've already forked lazarus-ccr
Manage WMVScroll properly
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3074 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -23,7 +23,7 @@ interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LResources, Forms, Controls, Graphics, DB, Grids, DBGrids,
|
||||
Dialogs, LCLType, jdbgridutils;
|
||||
Dialogs, LCLType, LMessages, jdbgridutils;
|
||||
|
||||
type
|
||||
|
||||
@ -80,6 +80,7 @@ type
|
||||
override;
|
||||
function DoMouseWheelDown(Shift: TShiftState; MousePos: TPoint): boolean; override;
|
||||
function DoMouseWheelUp(Shift: TShiftState; MousePos: TPoint): boolean; override;
|
||||
procedure WMVScroll(var Message: TLMVScroll); message LM_VScroll;
|
||||
procedure KeyDown(var Key: word; Shift: TShiftState); override;
|
||||
public
|
||||
{ Public declarations }
|
||||
@ -205,10 +206,10 @@ end;
|
||||
procedure TJDBGridControl.MouseDown(Button: TMouseButton; Shift: TShiftState;
|
||||
X, Y: integer);
|
||||
begin
|
||||
if not (integerDbGridControl.CanDefocus and
|
||||
doubleDbGridControl.CanDefocus and dateTimeDbGridControl.CanDefocus and
|
||||
stringDbGridControl.CanDefocus and dateDbGridControl.CanDefocus and
|
||||
timeDbGridControl.CanDefocus) then
|
||||
if not (integerDbGridControl.CanDefocus and doubleDbGridControl.CanDefocus and
|
||||
dateTimeDbGridControl.CanDefocus and stringDbGridControl.CanDefocus and
|
||||
dateDbGridControl.CanDefocus and timeDbGridControl.CanDefocus) then
|
||||
|
||||
abort
|
||||
else
|
||||
inherited MouseDown(Button, Shift, X, Y);
|
||||
@ -235,6 +236,16 @@ begin
|
||||
Result := inherited DoMouseWheelUp(Shift, MousePos);
|
||||
end;
|
||||
|
||||
procedure TJDBGridControl.WMVScroll(var Message: TLMVScroll);
|
||||
begin
|
||||
if not (integerDbGridControl.CanDefocus and doubleDbGridControl.CanDefocus and
|
||||
dateTimeDbGridControl.CanDefocus and stringDbGridControl.CanDefocus and
|
||||
dateDbGridControl.CanDefocus and timeDbGridControl.CanDefocus) then
|
||||
abort
|
||||
else
|
||||
inherited WMVScroll(Message);
|
||||
end;
|
||||
|
||||
procedure TJDBGridControl.KeyDown(var Key: word; Shift: TShiftState);
|
||||
begin
|
||||
inherited KeyDown(Key, Shift);
|
||||
|
Reference in New Issue
Block a user