I am trying to make a pagecontrol using delphi, the problem is when i switch the tabsheet's position to the sides the caption change too and i want it to be horizontal, any clue about how to do this ? Thanks in advance.
Asked
Active
Viewed 366 times
0
-
1The standard control doesn't support this – David Heffernan Jan 20 '20 at 08:15
-
IMHO, page controls with tabs on the sides or bottom shouldn't be used after Win 9x, partly because they look very bad with visual themes. It feels like a legacy feature that hasn't received any attention or love since XP was introduced in 2001. – Andreas Rejbrand Jan 20 '20 at 08:15
-
1I had a quick look at it, and it seems like you can make some progress by owner-drawing the tabs. I set `OwnerDraw` to `True`, increased the `TabHeight` and drew the horisontal text in the `OnDrawTab` handler. However, this still makes the tabs too thick. `var R: TRect; S: string; begin R := Rect; S := PageControl1.Pages[TabIndex].Caption; Control.Canvas.TextRect(R, S, [tfSingleLine, tfCenter, tfVerticalCenter, tfEndEllipsis]);` – Andreas Rejbrand Jan 20 '20 at 08:17
-
I think your best option is to use a different control. – Andreas Rejbrand Jan 20 '20 at 08:19
-
1(I don't quite see why this Q is downvoted. IMHO, the Q is reasonable.) – Andreas Rejbrand Jan 20 '20 at 08:26
-
I am sorry if my question isn't clear enough, im not a programmer i am just. Trying to learn by my self and i am not used to this forum – Hichem RAHMANI Jan 20 '20 at 08:34
-
@Andreas *...this still makes the tabs too thick* But you can reduce `TabWidth`. Something like 25 seems reasonable (depending on font). – Tom Brunberg Jan 20 '20 at 09:54
-
@Tom: Ah, didn't try that. Good point. Still, I am not convinced this is a good idea anyway... – Andreas Rejbrand Jan 20 '20 at 09:55
-
@Andreas You are right about problems with visual themes. – Tom Brunberg Jan 20 '20 at 10:10