Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6126637
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:24:01+00:00 2026-05-23T16:24:01+00:00

If you run the AdvanceDemo in the JVCL’s JvDocking example code, with VSNetStyle selected,

  • 0

If you run the AdvanceDemo in the JVCL’s JvDocking example code, with VSNetStyle selected, you can drag a second form onto the main form; a tab with the second form’s title will be displayed. If you then drag a another form onto the same side of the main form, another tab will be created. The two tabs will overlap:

screenshot of overlapping tabs

Is there a way to control how much these two tabs overlap? I’d like the tabs to be separated enough so that users can read the text on both tabs.

Thanks, as always — Al C.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T16:24:02+00:00Added an answer on May 23, 2026 at 4:24 pm

    As ain commented, I also think it is a bug. More precisely a bug in TJvDockVSChannel.Paint which draws the tabs (internally the tabs are called blocks). Such a block has a protected property InactiveBlockWidth whose name suggest controlling its width.
    The property works fine for the tab itself, but the caption is shifted by that same amount again in TJvDockVSChannel.Paint, which seems to me to be the problem.

    You can experiment as follows, by assigning the OnFinishSetDockPanelSize event of the DockServer:

    type
      TJvDockVSBlockAccess = class(TJvDockVSBlock);
    
    procedure TMainForm.lbDockServer1FinishSetDockPanelSize(
      DockPanel: TJvDockPanel);
    var
      Channel: TJvDockVSChannel;
      Block: TJvDockVSBlockAccess;
      i: Integer;
    begin
      if DockPanel is TJvDockVSNETPanel then
      begin
        Channel := TJvDockVSNETPanel(DockPanel).VSChannel;
        for i := 0 to Channel.BlockCount - 1 do
        begin
          Block := TJvDockVSBlockAccess(Channel.Block[i]);
          Block.InactiveBlockWidth := 100;
        end;
      end;
    end;
    

    Since this is a protected property for now, it might indicate its functionality being under construction. I suppose Jedi’s dev team have decided for now to draw only the glyph of each inactive tab, because there lacks a full implementation for dynamic handling of the tab widths. E.g. you should be able to set a minimum width of each tab, and when the bar (i.e. the container in which it resides) changes height, all tabs should widen or narrow accordingly.

    Edit:

    Thanks to the flexible design, you can work around the bug by setting the DockPanelClass property of the DockServer. I suppose that property has to be set befóre setting the Style property. It involves rewriting the whole Paint routine, because InactiveBlockWidth is also used in GetBlockRect, which in turn is not virtual:

    type
      TJvDockVSBlockAccess = class(TJvDockVSBlock);
    
      THackJvDockVSNETPanel = class(TJvDockVSNETPanel)
      public
        constructor Create(AOwner: TComponent); override;
      end;
    
      THackJvDockVSChannel = class(TJvDockVSChannel)
      protected
        procedure Paint; override;
        procedure ResetBlock; override;
        procedure Resize; override;
      end;
    
    const
      InactiveTabWidth = 100;
    
    { TMainForm }
    
    procedure TMainForm.FormCreate(Sender: TObject);
    begin
      ...
      JvDockVSNetStyle1.DockPanelClass := THackJvDockVSNETPanel;
    end;
    
    { THackJvDockVSNETPanel }
    
    constructor THackJvDockVSNETPanel.Create(AOwner: TComponent);
    begin
      inherited Create(AOwner);
      VSChannelClass := THackJvDockVSChannel;
    end;
    
    { THackJvDockVSChannel }
    
    procedure THackJvDockVSChannel.Paint;
    var
      I: Integer;
    
      procedure DrawSingleBlock(Block: TJvDockVSBlockAccess);
      var
        DrawRect: TRect;
        I: Integer;
        OldGraphicsMode: Integer;
        VisiblePaneCount: Integer;
    
        procedure AdjustImagePos;
        begin
          if Align = alLeft then
          begin
            Inc(DrawRect.Left, 3);
            Inc(DrawRect.Top, 4);
          end
          else if Align = alTop then
          begin
            Inc(DrawRect.Left, 4);
            Inc(DrawRect.Top, 2);
          end
          else if Align = alRight then
          begin
            Inc(DrawRect.Left, 4);
            Inc(DrawRect.Top, 4);
          end
          else if Align = alBottom then
          begin
            Inc(DrawRect.Left, 4);
            Inc(DrawRect.Top, 3);
          end;
        end;
    
      begin
        VisiblePaneCount := 0;
        for I := 0 to Block.VSPaneCount - 1 do
        begin
          if not Block.VSPane[I].Visible then
            Continue;
          GetBlockRect(Block, I, DrawRect);
          Canvas.Brush.Color := TabColor;
          Canvas.FillRect(DrawRect);
          Canvas.Brush.Color := clGray;
          Canvas.FrameRect(DrawRect);
          AdjustImagePos;
          Block.ImageList.Draw(Canvas, DrawRect.Left, DrawRect.Top, I);
          if Align in [alTop, alBottom] then
            Inc(DrawRect.Left, 24)
          else if Align in [alLeft, alRight] then
          begin
            Inc(DrawRect.Top, 24);
            if Align = alLeft then
              DrawRect.Left := 15
            else
              DrawRect.Left := 20;
            DrawRect.Right := DrawRect.Left + (DrawRect.Bottom - DrawRect.Top);
          end;
          Canvas.Brush.Color := TabColor;
          Canvas.Pen.Color := clBlack;
          Dec(DrawRect.Right, 3);
          OldGraphicsMode := SetGraphicsMode(Canvas.Handle, GM_ADVANCED);
          Canvas.Brush.Style := bsClear;
          DrawText(Canvas.Handle, PChar(Block.VSPane[I].DockForm.Caption), -1,
            DrawRect, DT_END_ELLIPSIS or DT_NOCLIP);
          SetGraphicsMode(Canvas.Handle, OldGraphicsMode);
          Inc(VisiblePaneCount);
        end;
        if VisiblePaneCount > 0 then
          CurrentPos := CurrentPos + BlockInterval;
      end;
    
    begin
      ResetBlock;
      CurrentPos := BlockStartOffset;
      for I := 0 to BlockCount - 1 do
        DrawSingleBlock(TJvDockVSBlockAccess(Block[I]));
    end;
    
    procedure THackJvDockVSChannel.ResetBlock;
    var
      I: Integer;
    begin
      inherited ResetBlock;
      for I := 0 to BlockCount - 1 do
        TJvDockVSBlockAccess(Block[I]).InactiveBlockWidth := InactiveTabWidth;
    end;
    
    procedure THackJvDockVSChannel.Resize;
    begin
      { Here you could widen or narrow the tabs according the total space and
        depending on the number of tabs }
      inherited Resize;
    end;
    

    Sample of widened tabs

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Run the following Java code: boolean b = false; Double d1 = 0d; Double
I run into following code in my project: html: <input type=button id=addmore value=Add more
I run an XPath in Java with the following xml and code: <?xml version=1.0
I run this code: graphic.addAnimation("standart",new int[] {0,1},1.0,true); which calls the graphic.addAnimation(String,int[],float,boolean) Method: public void
I run the code gives me the following sample data md5deep find * |
Run the following code In Mathematica: r=6197/3122; p[k_,w_]:=Sqrt[w^2/r^2-k^2];q[k_,w_]:=Sqrt[w^2-k^2]; a[k_,w_,p_,q_]:=(k^2-q^2)^2 Sin[p]Cos[q]+4k^2 p q Cos[p]Sin[q] a[k_,w_]:=a[k,w,p[k,w],q[k,w]];
I run the following code and I get back a pretty involved object back.
Run the following code, a = [1, 2, 3, 4, 5] head, *tail =
Run time error Cannot find column 0. below is my code string connectiostring =
Run out of ideas... I need to group all entries form database. There are

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.