Forum > LCL

[solved] TPageControl - Format Captions of Tabsheets

(1/2) > >>

Nicole:
The captions of my tabsheets look very narrow. I would like the words to have more inner space.
So there shall not be
|myCaption|

but

|  myCaption  |

Theoretically, I can do this by the space bar. Practically this is ugly, because the space would depend on the fonts-type and will not help me for top and bottom.

dje:
What os/widget interface are you using? Have you tried TabWidth?

Its doesn't work for me, since as far as I can see, the nbcTabsSizeable capability is only implemented for Windows and QT. (Im using GTK)

Apart from that, you either have to "roll your own" control, or use another control with TNoteBook, or find a custom TPageControl that supports tab resizing, or (if you using GTK) try to implement nbcTabsSizeable.

Nicole:
Thank you so much for the hint.
It works and does not.

Tabwith sets all Tabs to the same widths (0 does an autosize).
This means, my short captions are sized nicely, my long captions are capped on both sides.

I will think about generating captions about the same length to solve it in a quick way.

wp:
TPageControl is drawn by the widgetset, i.e. by Windows (I suppose you are on Windows). If the tabs are too narrow for you, the pagecontrol tabs in other programs will be too narrow as well. So, when you accept the tabs in other programs then why don't you accept the tabs in your application, too? If you cannot accept this, then you could only
- increase the tab width by adding spaces to the Caption (Tabsheet1.Caption := '   Raw data   ') (I would not consider this to be "ugly").
- switch to some third-party pagecontrol which gives you more control over the tab width or tab caption margin.

Nicole:
Yes, Windows.


--- Code: Diff  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} --- If the tabs are too narrow for you, the pagecontrol tabs in other programs will be too narrow as well. So, when you accept the tabs
I do not accept this, I do not know, how to change!
Would be nice to have more space around in some cases.

Navigation

[0] Message Index

[#] Next page

Go to full version