Howdy, Stranger!

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

In this Discussion

Programatically split a tabs zone into 2 x tabs zones under horizontal split zone

Dynamically I can create the layout tree by 

1. Create a new panel and dock it to SPACE zone
2. Create a new panel - undocked
3. Take the new panel and drag and dock it to the haDocsRight part of the first panel
4. This creates a tree of <Horizontal> with 2 x <TAB> children zones, and each <TAB> containing a single child of the created panels respectively

I now want to recreate this tree structure programatically

1. I can create the first <Tab> zone by docking the created panel to the SPACE zone
2. I cannot get the original <TAB> zone to split into 2 x <TAB> zones under a <Horizontal> Zone using the DockControl Function with a new panel

How can I programatically create the tree structure that was created dynamically

Comments

  • 4 Comments sorted by Votes Date Added
  • Hi,

    > 4. This creates a tree of <Horizontal> with 2 x <TAB> children zones, and each <TAB> containing a single child of the created panels respectively

    You wrong. This will not create two tabs zones. You can check this in DockingPack demo, where the structure of the site is shown in one of panels.

    I cannot get the original <TAB> zone to split into 2 x <TAB> zones under a <Horizontal> Zone using the DockControl Function with a new panel

    1) Dock the first panel (MyPanel1) into space zone with alClient align.
    2) Dock another one panel (MyPanel2) into the same space zone with alRigh align.

    Then, you can continue to dock additional panels to first or second panel zones (MyPanel1.Zone or MyPanel2.Zone) with alClient align to create tabs.

  • Hello Eugene

    I am NOT wrong, and sadly I am still unable to create the same zone tree (that is created manually/dynamically) if I programatically follow the steps in your answer 

    Please see videos at https://youtu.be/MbBSxonOIMI  for the LMD Demo and https://youtu.be/WkjHx8WIm-A for my own test demo based on your demo example - unfortunately the screen capture program is unable to capture your hotspots but the first panel is docked to space zone as alclient and the 2nd panel is docked to the documentright hotspot of the first panel ... and then see what happens when I programatically try to do the same by docking the panel to (various including the suggested same space zone) zones as alright 

    Please note in the video I am still unable to create the same tree structure using the answer supplied - the 2nd zone only comes out as a normal panel zone

    As I said I am NOT wrong - please look at the result of your own demo when I add the panels in manually. Please have a look at the video. Even though you say I am wrong, this structure is what I would expect to be created. I only want to know what I have to do to create this programatically

    image

    I created my own test program which included your code for building the tree (with some additional info) - please see attached files

    image

    image

    image

    Please note that the handles for each zone are included for each zone in the tree structure. Zone [035D8250] starts off as a <tabbed> zone when the first panel is added, but is then modified to become the <Horizontal> zone and a NEW zone [035D8550] is created to become the <tabbed> parent of the first panel, and a NEW <tabbed> zone and <panel> zone is created to hold the 2nd panel - when created MANUALLY

    How can I create this Tree Structure Programatically ?  As per my attached demo program you will see that it always creates the new panel as a normal panel WITHOUT tabs and not as the manually created tree structure

    Many thanks

    Andrew



    zip
    zip
    dockingtest.zip
    51K
    zip
    zip
    InkwaziDockTestEXE.zip
    4M
  • Posts: 0 Accepted Answer Vote Up0Vote Down
    Hi,

    I've attached the demo for you...
    rar
    rar
    DockingDemo.rar
    86K
  • Hi Eugene

    Thanks, that works

    For those who are reading this and want the answer ...

    The TAlign alignment parameter of the DockControl procedure of the Docksite component is NOT the vcl.controls TAlign, but a redefined set of values which I assume matches more with the TLMDActiveAreas set

    To create the requested tree dock the panel using the alDocRight alignment in the DockControl procedure, as opposed to the alRight I was using

    LMDDockSite1.DockControl(pnl, LMDDockSite1.SpaceZone, alDocRight);
Sign In or Register to comment.