This forum is temporaily read-only. All existing discussions remain available for reference. For new questions, bug reports or support requests, please contact us at mail@lmdsupport.com.

Right side click

Question
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?


Comments

  • 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.

  • 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);
    var
      pnl:    TLMDDockPanel;
      zn, tz: TLMDDockZone;
      i, ix:  Integer;
    begin
      pnl := Sender as TLMDDockPanel;
      zn  := pnl.Zone;

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

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