Howdy, Stranger!

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

In this Discussion

Docking pack training or tutorials

Hi folk,
Is there any training or video tutorials for the docking pack.
I looked at the documentation but I am not finding anything on using code to create a docking panel.
There is no api index to refer to or concepts.
Is there another manual that I am missing?

Comments

  • 7 Comments sorted by Votes Date Added
  • besides the docking demo, is there any code available to show how to create a docking panel at runtime with comments in the code?
    any help would be much appreciated.

    examples like creating a docked panel and floating panel would really help me out.

    Thank you
  • There are no tutorials or videos about that. Docking panel is just a control, like any other control. You can create it like this:

    pnl := TDockPanel.Create(Self); // Self is a main form.

    And then dock it into the docking site, like this:

    MySite.DockControl(pnl, ...);

    This is also shown in included LMD DockingPack demo.
  • Ok, I have tried that,
    I get an access violation.

    Here is the basic code i am using.
    Procedure TOXMain.CustomerPanel;
    Var
      OXFrame : TOXCustomerFrame;
      CP : TLMDDockPanel;
      zn: TLMDDockZone;
      Site: TLMDDockSite;
    Begin
        CP := TLMDDockPanel.Create(Self);
        zn := Site.SpaceZone;
            while (zn <> nil) and (zn.Kind <> zkTabs) and
              (zn.ZoneCount > 0) do
              zn := zn[0];

              if zn <> nil then

                CP := TLMDDockPanel.Create(Self);
                Site.DockControl(OXDashPanel, zn, alClient, -1 , true);

    End;

    What am I missing or doing wrong?
    Thank you
  • This is the basics of how I do it with Devexpress.

    Procedure TOXMainForm.QuotePanel;
    Var
      OXFrame : TOXQuoteFrame;
      CP : TdxDockPanel;
    Begin
      CP := TdxDockPanel.Create(Self);
      CP.Height := 800;
      CP.Width := 850;
      CP.Caption := 'Quote';
      CP.DockTo(OXDashboard, dtClient, -1);
      OXFrame := TOXQuoteFrame.Create(Self);
      OXFrame.Name := '';
      OXFrame.Parent := CP;
      Visible := True;
    End;
  • The code i am using is this, the first one had a duplicate TLMDDockPanel(create).

    Procedure TOXMain.CustomerPanel;
    Var
      OXFrame : TOXCustomerFrame;
      CP : TLMDDockPanel;
      zn: TLMDDockZone;
      Site: TLMDDockSite;
    Begin
        CP := TLMDDockPanel.Create(Self);
        zn := Site.SpaceZone;
        while (zn <> nil) and (zn.Kind <> zkTabs) and (zn.ZoneCount > 0) do
        zn := zn[0];
        if zn <> nil then
        Site.DockControl(OXDashPanel, zn, alClient, -1 , true);
    End;
  • edited January 2021 Posts: 0 Accepted Answer Vote Up0Vote Down
    You assign newly created dock panel to CP variable. But, later you use some other OXDashPanel variable in DockControl method call.

    Procedure TOXMain.CustomerPanel;
    Var
      OXFrame : TOXCustomerFrame;
      CP : TLMDDockPanel;
      zn: TLMDDockZone;
      Site: TLMDDockSite;
    Begin
        CP := TLMDDockPanel.Create(Self);
        zn := Site.SpaceZone;
        while (zn <> nil) and (zn.Kind <> zkTabs) and (zn.ZoneCount > 0) do
        zn := zn[0];
        if zn <> nil then
        Site.DockControl(OXDashPanel, zn, alClient, -1 , true);
    End;
  • Thank you that was it.

    I appreciate your feed back.
Sign In or Register to comment.