Recent

Author Topic: TTabControl rendered incorrectly?  (Read 470 times)

Cascade

  • Jr. Member
  • **
  • Posts: 57
TTabControl rendered incorrectly?
« on: October 03, 2025, 11:11:10 am »
When I add a TTabControl to a form, the control seems to be rendered incorrectly.  The tab buttons are shifted to the left, and there is an overlapping box underneath.  It looks quite similar to a PageControl, but I'm not sure whether there is a connection there.

I've attached a screenshot which explains the issue better than words.  It shows a TabControl with two tabs at the top, and then a PageControl below for comparison.

How might I get TTabControl to render correctly?


Hansaplast

  • Hero Member
  • *****
  • Posts: 737
  • Tweaking4All.com
    • Tweaking4All
Re: TTabControl rendered incorrectly?
« Reply #1 on: October 03, 2025, 03:17:45 pm »
I never use TabControl but can confirm this to be indeed a bug.
Just tried it on Tahoe with Lazarus from trunk and there we see this as well.


FYI for the devs: Lazarus 4.99 (rev main_4_99-2073-g15a44331c3) FPC 3.3.1 x86_64-darwin-cocoa

You should probably open a bug report (here).

Nicole

  • Hero Member
  • *****
  • Posts: 1271
Re: TTabControl rendered incorrectly?
« Reply #2 on: October 03, 2025, 04:03:38 pm »
Not sure, if my observations can help.
I use TPageControl much and there Tabsheets. As I thought over to switch from Windows to Linux I spent some time on their behaviour.

Those are done by Windows in a way, that they are arranged by themselves. When there are too many for one line, the line with the Tabsheets is wrapped into the next line.

Not so Linux: There you can shift them from left to right and do not see them all.

You will say: What may this have to do with my thing? I wonder, if the strange box you see may be related with the different way to handle it by operating systems.

If you can, try this: Try the code on Linux, if you run Windows and vice versa. And find out, if the problem persists or modifies or even is gone.

Cascade

  • Jr. Member
  • **
  • Posts: 57
Re: TTabControl rendered incorrectly?
« Reply #3 on: October 03, 2025, 05:12:53 pm »
 :) Thanks for the replies Nicole and Hansaplast.

I've opened an Issue here:
https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/41854

Hansaplast

  • Hero Member
  • *****
  • Posts: 737
  • Tweaking4All.com
    • Tweaking4All
Re: TTabControl rendered incorrectly?
« Reply #4 on: October 03, 2025, 06:20:27 pm »
Added a thumbs up in Bug Tracker 😉

wp

  • Hero Member
  • *****
  • Posts: 13199
Re: TTabControl rendered incorrectly?
« Reply #5 on: October 03, 2025, 11:28:27 pm »
Just to confirm: The same issue can be seen in macOS Monterey 12 with Laz/main + fpc 3.2.2

 

TinyPortal © 2005-2018