dockmanager example: exclude dock grabber image if not used

git-svn-id: trunk@24776 -
This commit is contained in:
dodi 2010-04-21 01:59:52 +00:00
parent 7693e5163a
commit fb7e72df4d

View File

@ -280,7 +280,8 @@ begin
//wrap into dock site
Site := WrapDockable(AForm);
end;
//create a docking handle - should become a component?
if DockGrip <> nil then begin
//create a docking handle - should become a component?
img := TImage.Create(AForm); //we could own the img, and be notified when its parent becomes nil
img.Align := alNone;
//if ForIDE then
@ -311,9 +312,12 @@ begin
//else???
img.OnMouseMove := @DockHandleMouseMove;
img.Visible := True;
end else
img := nil;
//make visible, so that it can be docked without problems
AForm.Visible := True;
AForm.EnableAlign;
if img <> nil then
img.BringToFront;
if ForIDE and fWrap and assigned(Site) and assigned(Site.DockManager) then begin
//site.DockManager.ResetBounds(True); //doesn't help