Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1165
  • Last Modified:

Creating a form into a Docksite

I have 2 forms, FORM1 and FRM_DOCKABLE.

I've made it possible for FRM_DOCKABLE to dock in PANEL1 in FORM1 using the following property settings...

> FORM1.PANEL1.DockSite := true;
> FORM1.PANEL1.UseDockManager  := true;

> FRM_DOCKABLE.DragKind  := dkDock;
> FRM_DOCKABLE.DragMode := dmAutomatic;
> FRM_DOCKABLE.UseDockManager :=  true;

Its all working very nicely but now I want FRM_DOCKABLE to be docked into FORM1.PANEL1 upon its creation. How do I do this?

I've tried...

> procedure TFORM1.FormCreate(Sender: TObject);
> begin
>   FRM_DOCKABLE := TFRM_DOCKABLE .Create(Self);
>   FRM_DOCKABLE.Parent := PANEL1;
>   FRM_DOCKABLE.Show;
> end;

but this makes FRM_DOCKABLE appear inside FORM1.PANEL1 un Maximized.

0
ziche
Asked:
ziche
  • 2
1 Solution
 
geobulCommented:
...
>   FRM_DOCKABLE.Parent := PANEL1;
     FRM_DOCKABLE.WindowState := wsMaximized;
>   FRM_DOCKABLE.Show;
...

Regards, Geo
0
 
geobulCommented:
Another way is:

> procedure TFORM1.FormCreate(Sender: TObject);
> begin
>   FRM_DOCKABLE := TFRM_DOCKABLE .Create(Self);
>   FRM_DOCKABLE.ManualDock(PANEL1);
>   FRM_DOCKABLE.Show;
> end;
0
 
DragonSlayerCommented:
or

frm_Dockable.Align := alClient;
0
 
zicheAuthor Commented:
Beautiful!
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now