diff --git a/lcl/forms.pp b/lcl/forms.pp index 87dd669728..07cd042657 100644 --- a/lcl/forms.pp +++ b/lcl/forms.pp @@ -132,7 +132,6 @@ type Protected procedure AlignControls(AControl: TControl; var ARect: TRect); override; procedure CreateWnd; override; - function GetClientScrollOffset: TPoint; override; Procedure WMEraseBkgnd(var Message: TLMEraseBkgnd); message LM_ERASEBKGND; procedure WMPaint(var message: TLMPaint); message LM_PAINT; procedure WMSize(var Message: TLMSize); message LM_Size; @@ -162,6 +161,8 @@ type { TScrollBox } TScrollBox = class(TScrollingWinControl) + protected + function GetClientScrollOffset: TPoint; override; public constructor Create(AOwner: TComponent); override; published diff --git a/lcl/grids.pas b/lcl/grids.pas index 0e41aa118c..51ba606e89 100644 --- a/lcl/grids.pas +++ b/lcl/grids.pas @@ -405,7 +405,7 @@ Type Type //TCustomGrid=Class(TScrollBox) //TCustomGrid=Class(TCustomControl) - TCustomGrid=Class(TScrollingWinControl) + TCustomGrid = Class(TScrollingWinControl) Private FAutoAdvance: TAutoAdvance; FDefaultDrawing: Boolean; @@ -2362,7 +2362,7 @@ Var R: TRect; begin inherited MouseDown(Button, Shift, X, Y); - {$IfDef dbgFocus}WriteLn('MouseDown INIT');{$Endif} + {$IfDef dbgFocus}WriteLn('TCustomGrid.MouseDown INIT ',Name,':',ClassName);{$Endif} If Not FGCache.ValidGrid Then Exit; If Not (ssLeft in Shift) Then Exit; Gz:=MouseToGridZone(X,Y, False); @@ -2416,7 +2416,7 @@ begin End; End; End; - {$ifDef dbgFocus} WriteLn('MouseDown END'); {$Endif} + {$ifDef dbgFocus} WriteLn('TCustomGrid.MouseDown END'); {$Endif} end; procedure TCustomGrid.MouseMove(Shift: TShiftState; X, Y: Integer); @@ -2452,7 +2452,7 @@ var begin inherited MouseUp(Button, Shift, X, Y); If Not FGCache.ValidGrid Then Exit; - {$IfDef dbgFocus}WriteLn('MouseUP INIT');{$Endif} + {$IfDef dbgFocus}WriteLn('TCustomGrid.MouseUP INIT');{$Endif} Cur:=MouseToCell(Point(x,y)); Case fGridState of gsSelecting: @@ -2487,7 +2487,7 @@ begin End; End; fGridState:=gsNormal; - {$IfDef dbgFocus}WriteLn('MouseUP END RND=',Random);{$Endif} + {$IfDef dbgFocus}WriteLn('TCustomGrid.MouseUP END RND=',Random);{$Endif} end; procedure TCustomGrid.DblClick; diff --git a/lcl/include/scrollbox.inc b/lcl/include/scrollbox.inc index 18d0bbb099..df4cd83ddf 100644 --- a/lcl/include/scrollbox.inc +++ b/lcl/include/scrollbox.inc @@ -1,3 +1,5 @@ +// included by forms.pp + { ***************************************************************************** * * @@ -13,8 +15,17 @@ ***************************************************************************** } +function TScrollBox.GetClientScrollOffset: TPoint; +begin + Result.X:=HorzScrollBar.Position; + Result.Y:=VertScrollBar.Position; +end; + constructor TScrollBox.Create(AOwner: TComponent); begin Inherited Create(AOwner); fCompStyle:= csScrollBox; end; + +// included by forms.pp + diff --git a/lcl/include/scrollingwincontrol.inc b/lcl/include/scrollingwincontrol.inc index edd36188ff..c5ebe4e033 100644 --- a/lcl/include/scrollingwincontrol.inc +++ b/lcl/include/scrollingwincontrol.inc @@ -336,12 +336,6 @@ begin UpdateScrollBars; end; -function TScrollingWinControl.GetClientScrollOffset: TPoint; -begin - Result.X:=HorzScrollBar.Position; - Result.Y:=VertScrollBar.Position; -end; - procedure TScrollingWinControl.AlignControls(AControl: TControl; var ARect: TRect); begin HorzScrollBar.AutoCalcRange;