mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-09 22:36:10 +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);
|
TheWinControl:=TWinControl(Sender);
|
||||||
if not TheWinControl.HandleAllocated then exit;
|
if not TheWinControl.HandleAllocated then exit;
|
||||||
Handle := TheWinControl.Handle;
|
Handle := TheWinControl.Handle;
|
||||||
|
ORect.Left := 0;
|
||||||
|
ORect.Top := 0;
|
||||||
if TheWinControl is TScrollingWinControl then
|
if TheWinControl is TScrollingWinControl then
|
||||||
begin
|
with TScrollingWinControl(TheWinControl) do
|
||||||
ORect.Left := -TScrollingWinControl(TheWinControl).HorzScrollBar.Position;
|
begin
|
||||||
ORect.Top := -TScrollingWinControl(TheWinControl).VertScrollBar.Position;
|
if HorzScrollBar <> nil then
|
||||||
end else begin
|
ORect.Left := -HorzScrollBar.Position;
|
||||||
ORect.Left := 0;
|
if VertScrollBar <> nil then
|
||||||
ORect.Top := 0;
|
ORect.Top := -VertScrollBar.Position;
|
||||||
end;
|
end;
|
||||||
ORect.Bottom := 0;
|
ORect.Bottom := 0;
|
||||||
ORect.Right := 0;
|
ORect.Right := 0;
|
||||||
If (TheWinControl is TCustomGroupBox) Then
|
If (TheWinControl is TCustomGroupBox) Then
|
||||||
|
Loading…
Reference in New Issue
Block a user