mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-03 02:18:19 +02:00
horzscrollbar is nil sometimes when destroying component (fixing symptoms instead of cause?, fixes bug #607)
git-svn-id: trunk@6820 -
This commit is contained in:
parent
14132a2414
commit
b5bdb59ab4
@ -773,14 +773,16 @@ Begin
|
||||
TheWinControl:=TWinControl(Sender);
|
||||
if not TheWinControl.HandleAllocated then exit;
|
||||
Handle := TheWinControl.Handle;
|
||||
ORect.Left := 0;
|
||||
ORect.Top := 0;
|
||||
if TheWinControl is TScrollingWinControl then
|
||||
begin
|
||||
ORect.Left := -TScrollingWinControl(TheWinControl).HorzScrollBar.Position;
|
||||
ORect.Top := -TScrollingWinControl(TheWinControl).VertScrollBar.Position;
|
||||
end else begin
|
||||
ORect.Left := 0;
|
||||
ORect.Top := 0;
|
||||
end;
|
||||
with TScrollingWinControl(TheWinControl) do
|
||||
begin
|
||||
if HorzScrollBar <> nil then
|
||||
ORect.Left := -HorzScrollBar.Position;
|
||||
if VertScrollBar <> nil then
|
||||
ORect.Top := -VertScrollBar.Position;
|
||||
end;
|
||||
ORect.Bottom := 0;
|
||||
ORect.Right := 0;
|
||||
If (TheWinControl is TCustomGroupBox) Then
|
||||
|
Loading…
Reference in New Issue
Block a user