Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

Prevent floating form

In the LMD docking controls, is it possible to prevent users from creating floating forms i.e. only allow users to dock forms onto my application's main form?  I don't want to have floating dock panels.  Is it possible?  Thank you.

Comments

  • 2 Comments sorted by Votes Date Added
  • It is not possible generally, but as a workaround you can use OnUndock site's event:

    procedure TForm2.LMDDockSite1UnDock(Sender: TObject; Client: TControl;
      NewTarget: TWinControl; var Allow: Boolean);
    begin
      Allow := (NewTarget = LMDDockSite1);
    end;

    However, this will work only for styles without DragContent (old VS2005 style), because if DragContent is set to True, panels undocked immediately at drag-start moment of time.
  • Thanks a lot for that tip.  That resolves my floating form issue, and also the web browser issue I had earlier - if I now use the VS2005 style and don't allow floating forms, the TWebBrowser control does not need to reload the content when the panel is moved.


Sign In or Register to comment.