MG: fixed ControlAtPos

git-svn-id: trunk@3603 -
This commit is contained in:
lazarus 2002-11-03 22:40:28 +00:00
parent 7f51bddfb5
commit 5494b07328
2 changed files with 4 additions and 13 deletions

View File

@ -129,7 +129,7 @@ type
Protected
procedure AlignControls(AControl: TControl; var ARect: TRect); override;
procedure CreateWnd; override;
function GetChildsRect(Scrolled: boolean): TRect; 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;

View File

@ -335,19 +335,10 @@ begin
UpdateScrollBars;
end;
function TScrollingWinControl.GetChildsRect(Scrolled: boolean): TRect;
var
ScrolledX, ScrolledY: integer;
function TScrollingWinControl.GetClientScrollOffset: TPoint;
begin
Result:=inherited GetChildsRect(Scrolled);
if Scrolled then begin
ScrolledX:=HorzScrollBar.Position;
ScrolledY:=VertScrollBar.Position;
dec(Result.Left,ScrolledX);
dec(Result.Top,ScrolledY);
dec(Result.Right,ScrolledX);
dec(Result.Bottom,ScrolledY);
end;
Result.X:=HorzScrollBar.Position;
Result.Y:=VertScrollBar.Position;
end;
procedure TScrollingWinControl.AlignControls(AControl: TControl; var ARect: TRect);