Reputation: 31
I need to drag and drop a form in another form and then, make this dropped form child of the form it's been dragged in.
How can I do that?
Upvotes: 3
Views: 967
Reputation: 11217
Adding to Remy's answer: Depending on the version of Delphi and the version of Windows you use, you won't like the builtin support. In my case, Delphi 2007 combined with Windows 8 looks terrible. Delphi 2007 with Windows XP looks ok.
You might want to have a look at the docking components in the JVCL. * TJvDockSeverver * TJvDockVIDStyle * TJvDockClient
There are several examples on using them and they look much nicer even with Delphi 2007 + Windows 8 than the buildin support.
Upvotes: 0
Reputation: 596256
Put a TPanel
onto the second Form and set its DockSite
property to True. You can then drag&drop a Form onto that TPanel
and it will dock inside of it as a child.
Upvotes: 3