From 94629674b8b522157674ff1009f418083854bd9c Mon Sep 17 00:00:00 2001 From: mattias Date: Sun, 20 Jun 2010 13:51:19 +0000 Subject: [PATCH] anchordocking: BringToFront: focus child form git-svn-id: trunk@26206 - --- examples/anchordocking/anchordocking.pas | 6 ++++-- examples/anchordocking/design/registeranchordocking.pas | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/examples/anchordocking/anchordocking.pas b/examples/anchordocking/anchordocking.pas index f22273a17d..63b9918d96 100644 --- a/examples/anchordocking/anchordocking.pas +++ b/examples/anchordocking/anchordocking.pas @@ -1793,8 +1793,10 @@ begin AControl.EnableAutoSizing; end; // BringToFront - if BringToFront and (Site<>nil) then + if BringToFront and (Site<>nil) then begin GetParentForm(Site).BringToFront; + Site.SetFocus; + end; end; procedure TAnchorDockMaster.MakeDockSite(AForm: TCustomForm; Sites: TAnchors; @@ -4627,7 +4629,7 @@ begin WidthDiff:=FSiteClientRect.Right-OldSiteClientRect.Right; HeightDiff:=FSiteClientRect.Bottom-OldSiteClientRect.Bottom; - debugln(['TAnchorDockManager.ResetBounds ',DbgSName(Site),' ',dbgs(Child.BaseBounds),' ',WidthDiff,',',HeightDiff]); + //debugln(['TAnchorDockManager.ResetBounds ',DbgSName(Site),' ',dbgs(Child.BaseBounds),' ',WidthDiff,',',HeightDiff]); case ResizePolicy of admrpChild: begin diff --git a/examples/anchordocking/design/registeranchordocking.pas b/examples/anchordocking/design/registeranchordocking.pas index 2bf104b429..4828d6bbcb 100644 --- a/examples/anchordocking/design/registeranchordocking.pas +++ b/examples/anchordocking/design/registeranchordocking.pas @@ -353,6 +353,7 @@ begin Parent:=GetParentForm(AForm); if Parent<>nil then Parent.ShowOnTop; + AForm.SetFocus; end; end; //debugln(['TIDEAnchorDockMaster.ShowForm END ',DbgSName(AForm),' ',dbgs(AForm.BoundsRect)]);