Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2015-10

Too much space between TPageControl and its tabs

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Luca Olivetti

Hello,

I have to show different things at different times in the same position. Instead of putting everything in the same spot of the form and setting Visible only the item I want to show (which makes designing difficult), I'm using a TPageControl with ShowTabs=False.
The problem is that, at least on windows, there are 4 pixels of border between the tab and the pagecontrol (on Linux it's just 2, but the border is still there).
I couldn't find a property to avoid it, and looking how it is drawn, it seems it is deferred to windows, so there is no way to avoid this border. Am I wrong?
Is there an alternative component that I could use? For the time being, I use a panel and create the different controls at runtime, but this is possible only in simple cases, not for complex designs (well, of course it's possible but it's something I'd prefer to do visually).

Bye

Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007

Reply by email

Ondrej Pokorny
to Luca Olivetti
Luca Olivetti wrote 20 lines
Hello, I have to show different things at different times in the same position. Instead of putting everything in the same spot of the form and setting Visible only the item I want to show (which makes designing difficult), I'm using a TPageControl with ShowTabs=False. The problem is that, at least on windows, there are 4 pixels of border between the tab and the pagecontrol (on Linux it's just 2, but the border is still there). I couldn't find a property to avoid it, and looking how it is drawn, it seems it is deferred to windows, so there is no way to avoid this border. Am I wrong? Is there an alternative component that I could use? For the time being, I use a panel and create the different controls at runtime, but this is possible only in simple cases, not for complex designs (well, of course it's possible but it's something I'd prefer to do visually). Bye

Have you tried to ask uncle Google? He knows a lot: https://www.google.at/search?q=delphi+no+border+pagecontrol

In Delphi it is possible, I haven't tried in Lazarus. But since it is WinAPI, it should be possible as well.

Ondrej

Reply by email

Luca Olivetti
to Ondrej Pokorny

El 29/10/15 a les 09:17, Ondrej Pokorny ha escrit:

Have you tried to ask uncle Google? He knows a lot: https://www.google.at/search?q=delphi+no+border+pagecontrol

Duh, why didn't I think of that?

In Delphi it is possible, I haven't tried in Lazarus. But since it is WinAPI, it should be possible as well.

It works, but it introduces a dependency on the windows unit. I need it on windows, so it isn't a big concern, but I don't like it 100%.

Bye

Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007

Reply by email