Howdy, Stranger!

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

In this Discussion

Share Me

  • Please share this topic with your friends. Click any of the icons below:
  • Twitter
  • facebook
  • reddit
  • email

LMDDocking: how to set up a Zone's width (when zone kind ="VERT")

When I have a vertical zone that includes 2 panels, how can I set its width?
Doing Zone.Width := new value;  has no effect.
For example, in the layout below:

<sitelist>
    <site id="Form14.LMDDockSite1">
        <zone kind="HORZ">
            <zone kind="PANEL" id="Form14.p1" visible="1" size="159" dsize="0.1691924044841"/>
            <zone kind="VERT" size="200" dsize="0.212722489132922">
                <zone kind="PANEL" id="Form14.p2" visible="1" size="202" dsize="0.696356275303644"/>
                <zone kind="PANEL" id="Form14.p3" visible="1" size="150" dsize="0.303643724696356"/>
            </zone>
            <zone kind="VERT" size="391" dsize="0.415957446808511">
                <zone kind="PANEL" id="Form14.p4" visible="1" size="115" dsize="0.333333333333333"/>
                <zone kind="HORZ" size="116" dsize="0.299065420560747">
                    <zone kind="PANEL" id="Form14.p5" visible="1" size="178" dsize="0.46304347826087"/>
                    <zone kind="PANEL" id="Form14.p6" visible="1" size="207" dsize="0.53695652173913"/>
                </zone>
                <zone kind="PANEL" id="Form14.p7" visible="1" size="115" dsize="0.367601246105919"/>
            </zone>
            <zone kind="PANEL" id="Form14.p8" visible="1" size="190" dsize="0.202127659574468"/>
        </zone>
    </site>
</sitelist>


I want to set the value of the first VERT zone in that xml, the one that contains both panels 'p2' and 'p3', so that the width of both panels are set together (and the width of the next VERT zone is automatically reduced).
How can that be achieved?

Comments

  • 3 Comments sorted by Votes Date Added
  • Posts: 0 Accepted Answer Vote Up0Vote Down
    Hi,

    I've just checked it, and I can't reproduce your problem; everything works good. 

    So, first, please check that a zone your try to resize is really a VERT zone; may be you just trying to resize some another wrong zone.
    And second, if you can, please send me (or attach here at forum) a small demo, which will show the issue.
  • Ok, you were right, I was not verifying the zone kind and trying to assign the width to the wrong one, when I should use its parent.
    I suppose the trick is to navigate through its parent (and the parent's parent) until you find the first zone with the kind you are looking for.
    In my case, this was enough:

     lz := LMDDockSite1.FindZoneByClient(p2);
     if Lz <> nil then
     BEGIN
       if lz.Kind = zkPanel then
       begin
        if lz.Parent <> nil then
          lz := lz.Parent;
       end;

    Lz.Width := 300;

    Thanks for the help.
    Alex


Sign In or Register to comment.