Recent

Author Topic: Is there a way to emphasize the active tab in a TPagecontrol?  (Read 853 times)

dpap

  • Jr. Member
  • **
  • Posts: 52
Is there a way to emphasize the active tab in a TPagecontrol?
« on: February 09, 2025, 12:53:57 pm »
The active tab in a TPage/TabControl is not easy to distinguish from the inactive tab. is there a way to add this feature (bold/italic/psolored font etc) ?

EDIT:
PS-1. I use Windows 11
PS-2. TcyPageControl emphasizes the caption but not only the selected (the previous stays emphasized!). And TcyTabControl doesn't emphasize at all
« Last Edit: February 10, 2025, 10:34:56 am by dpap »

cdbc

  • Hero Member
  • *****
  • Posts: 1953
    • http://www.cdbc.dk
Re: Is there a way to emphasize the active tab in a TPagecontrol?
« Reply #1 on: February 09, 2025, 04:17:43 pm »
Hi
I bet you're on winders, 'cause it's working great on linux with QT5...
Search this forum, there have been some posts regarding pagecontrol etc.
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE5 -> FPC 3.2.2 -> Lazarus 3.6 up until Jan 2024 from then on it's both above &: KDE5/QT5 -> FPC 3.3.1 -> Lazarus 4.99

morknot

  • Jr. Member
  • **
  • Posts: 53
  • still learning
Re: Is there a way to emphasize the active tab in a TPagecontrol?
« Reply #2 on: February 13, 2025, 11:11:25 am »
Apart from changing the page control Style to one of the 2 button options, it doesn't look like it.

cdbc

  • Hero Member
  • *****
  • Posts: 1953
    • http://www.cdbc.dk
Re: Is there a way to emphasize the active tab in a TPagecontrol?
« Reply #3 on: February 13, 2025, 11:59:34 am »
Hi
IIRC on winders, this involves some /own/-painting on the tab-'flaps'-canvas, it's somewhat the same with the 'closebutton' -- DIY
I do believe that most of it is described here on the forum, search for it...
Regards benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE5 -> FPC 3.2.2 -> Lazarus 3.6 up until Jan 2024 from then on it's both above &: KDE5/QT5 -> FPC 3.3.1 -> Lazarus 4.99

LV

  • Full Member
  • ***
  • Posts: 239
Re: Is there a way to emphasize the active tab in a TPagecontrol?
« Reply #4 on: February 13, 2025, 08:56:18 pm »
This method is very straightforward. I tested it on Windows 11, but I believe it also works on other operating systems. Enjoy!  :-[

 

TinyPortal © 2005-2018