anchordocking: use MakeFullyVisible

git-svn-id: trunk@41972 -
This commit is contained in:
mattias 2013-07-02 16:29:39 +00:00
parent 5d64e62ba7
commit 0b36dae130

View File

@ -2495,12 +2495,22 @@ begin
end;
procedure TAnchorDockMaster.MakeVisible(AControl: TControl; SwitchPages: boolean);
var
Form: TCustomForm;
begin
while AControl<>nil do begin
AControl.Visible:=true;
if SwitchPages and (AControl is TAnchorDockPage) then
TAnchorDockPageControl(AControl.Parent).PageIndex:=
TAnchorDockPage(AControl).PageIndex;
if AControl.Parent=nil then begin
if AControl is TCustomForm then begin
Form:=TCustomForm(AControl);
if Form.Monitor<>nil then
Form.MakeFullyVisible(nil,true);
end;
break;
end;
AControl:=AControl.Parent;
end;
end;