Forum > Designer
[solved] How to arrange tabs of a TPageControl
Muso:
I use Lazarus 4.2 and I have a TPageControl. I use its option "nboMultiLine".
By default there is one tab in the first line and the 3 others in the second line see the attached PNG.
(by the way, how can one insert images inline to a forum post?)
But I want to have 4 tabs and each 2 of them should be in a line of tabs.
I only get this when I decrease the width of the TPageControl, see the attached GIF.But I want to keep the width of the TPageControl because as it works with fewer width it should work also with more available width. But I can#t find out how this is done.
Zvoni:
IIRC, the Multiline-Property/Option has to do with multilined CAPTIONS of the Tabs, not how many Tabs are on the Control in how many lines
Martin_fr:
Afaik (but not checked) the nboMultiline flag is simple send to the OS (at least on Windows), and the OS then decides how it wraps the tabs.
I would expect other OS/WS (if they support multiline at all) to also control that by the OS/WS (and not in the LCL).
If you want to control it yourself, you may need a custom drawn component. Or have 2 individual TTabControls, but then there would be no auto wrap at all.
Zvoni:
--- Quote from: Martin_fr on August 18, 2025, 03:05:53 pm ---Afaik (but not checked) the nboMultiline flag is simple send to the OS (at least on Windows), and the OS then decides how it wraps the tabs.
--- End quote ---
https://lazarus-ccr.sourceforge.io/docs/lcl/comctrls/tcustomtabcontrol.options.html
--- Quote ---nboMultiLine
Enables word wrapped or multi-line captions on tabs. Used to read or write the value for the MultiLine property.
--- End quote ---
Muso:
--- Quote from: Zvoni on August 18, 2025, 02:46:56 pm ---IIRC, the Multiline-Property/Option has to do with multilined CAPTIONS of the Tabs, not how many Tabs are on the Control in how many lines
--- End quote ---
For me "MultiLine" or "nboMulitLine" are always set to the same value. And this option decided how many tab line I get:
Navigation
[0] Message Index
[#] Next page