5

How do I do the IDE method or eventually make the basic dock method without the very slow freezing movement of the dockable form?

When I Googled for dockable forms in Delphi and found a post by Zibadian on Programmers Heaven:

First off: The windows in the Delphi IDE aren't MDI forms, by SDI forms.

Now to create a dockable window.

Form2 will be dockable and Form1 will be the place to dock it to. Place a control (such as a TPanel) on Form1 to serve a DockSite. Make sure that you set the DockSite and the UseDockManager properties to true for that control.

For Form2 set the DragKind to dkDrop, the DragMode to dmAutomatic and UseDockManager to true.

That was the basic dock function. If you run your program, show the Form2 and drag that form over the docksite, it should dock at that site. You can even undock it by grabbing the "caption" as you have seen in the IDE.

For me, that method moves the dockable form very slowly. However, Zibadian's answer continues to describe how the IDE does it instead:

The dock-method of the IDE is a little more complex, since you don't see the docksite. I think, you need to write a Form1.OnDockOver or Form1.OnDockDrop to perform that. That (Those) event(s) need to show the docksite at the appropriate location.

1
  • 2
    what version of Delphi are you using? in recent versions there's a ScreenSnap property for that purpose Aug 13, 2009 at 22:32

2 Answers 2

8

Have a look at the Using the TDockTabSet component article by Jeremy North. It is a few years old but should give you some helpful pointers.

1
  • I tried TDockTabSet and its example, and it's slow and it flickers. In my humble opinion it may have been good in the day, but it's not working very well any more on Delphi XE or XE2.
    – Warren P
    Feb 17, 2012 at 14:23
4

Try the JVCL Docking library

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.