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