Howdy, Stranger!

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

In this Discussion

Right side click

Please see image:

When you press [x] is it possible to go to the right-most tab, instead of the first tab?

This seems to be a change required in the LMD Dock VCL source code.

Or can you tell, what is the way to ensure, that it always goes to the right-most tab, even if it's a dock, a tab, or a window?


  • 2 Comments sorted by Votes Date Added
  • Reason for doing so:

    In competitor or competing tab/dock VCLs, when closing the tab, it goes to the right-side and one customer I have, is affected.

    I'm requesting if it can have similar behavior.

  • Posts: 0 Accepted Answer Vote Up0Vote Down
    Probably we need to improve this behavior. But, for now you can use dock-panels OnClose event to implement workaround:

    procedure TForm16.LMDDockPanel1Close(Sender: TObject;
      var CloseAction: TLMDockPanelCloseAction);
      pnl:    TLMDDockPanel;
      zn, tz: TLMDDockZone;
      i, ix:  Integer;
      pnl := Sender as TLMDDockPanel;
      zn  := pnl.Zone;

      if (zn.Parent <> nil) and (zn.Parent.Kind = zkTabs) then
        tz := zn.Parent;
        ix := zn.Index;

        if ix > 0 then
          tz.SelectedPage := tz[ix - 1];
Sign In or Register to comment.