Recent

Author Topic: TPageControl cross-platform question  (Read 3359 times)

sash

  • Sr. Member
  • ****
  • Posts: 366
Re: TPageControl cross-platform question
« Reply #15 on: May 24, 2019, 11:23:31 am »
This is not bug, but rather a specifics of underlying widget's implementation.

On gtk (and IIRC on qt too) there's a tab's close button feature, while windows lacks one, and this particular reason forced me to use custom-drawn control for my needs.

Such differences should be always taken into account, when dealing with cross-widgetset GUI apps.
Lazarus 2.0.10 FPC 3.2.0 x86_64-linux-gtk2 @ Ubuntu 20.04 XFCE

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1106
Re: TPageControl cross-platform question
« Reply #16 on: May 24, 2019, 12:16:02 pm »
This is not bug, but rather a specifics of underlying widget's implementation.
I agree.

Quote
On gtk (and IIRC on qt too) there's a tab's close button feature, while windows lacks one, and this particular reason forced me to use custom-drawn control for my needs.
If TPageControl on Windows had an "tab's close button", which is a recurrent issue, it would be an excellent feature instead of we always doing some sort of workaround to achieve it.

pagecontrol; tabsheet and close button
https://forum.lazarus.freepascal.org/index.php/topic,22678.0.html

[SOLVED] Pagecontrol and tabs
https://forum.lazarus.freepascal.org/index.php/topic,35434.0.html

TabSheet close / right click menu
https://forum.lazarus.freepascal.org/index.php/topic,27264.0.html

Disable individual tabsheets of pagecontrol
https://forum.lazarus.freepascal.org/index.php/topic,33386.0.html

How to implement a close button for a TTabsheet of a TPageControl
https://stackoverflow.com/questions/2201850/how-to-implement-a-close-button-for-a-ttabsheet-of-a-tpagecontrol

etc
https://www.google.com/search?client=firefox-b-d&q=lazarus+pagecontrol+close+tabsheet

Tab based Form error segmentation
https://forum.lazarus.freepascal.org/index.php/topic,36985.0.html

Tpagecontrol : Ttabsheet close button
https://forum.lazarus.freepascal.org/index.php/topic,8497.0.html

Custom Drawn Controls advances
https://forum.lazarus.freepascal.org/index.php/topic,15209.msg86690.html#msg86690

Dynamic GUI component - Help to understand
https://forum.lazarus.freepascal.org/index.php/topic,11731.msg59204.html#msg59204

TPageControl and close button
https://forum.lazarus.freepascal.org/index.php/topic,7952.0.html

Quote
Such differences should be always taken into account, when dealing with cross-widgetset GUI apps.
LCL should minimize those differences by implementing only the minimum features provided by all supported OSes or by extending some special features all OSes should have.

wp

  • Hero Member
  • *****
  • Posts: 11910
Re: TPageControl cross-platform question
« Reply #17 on: May 24, 2019, 07:54:38 pm »
LCL should minimize those differences by implementing only the minimum features provided by all supported OSes or by extending some special features all OSes should have.
I don't think so. Not every program is written to be cross-platform!

The problem is that there is a "Restrictions" page in the Object inspector which lists the incompatibilities between widget sets and which should be respected when writing cross-platform applications. But the Restrictions page, as well as "View" > "Restriction browser", is so confusing that nobody knows and understands it (including myself).

zoltanleo

  • Sr. Member
  • ****
  • Posts: 488
Re: TPageControl cross-platform question
« Reply #18 on: May 26, 2019, 11:08:57 pm »
LCL should minimize those differences by implementing only the minimum features provided by all supported OSes
LCL TPageControl in Lazarus has surprisingly poor functionality (especially for Windows). This is all the more surprising because TPageControl is the base component in Delphi. This is very regrettable. It also limits its use and forces you to look for other components to replace it.

@jptferreira

Try component ATTabs (you can install it from OPM) by Alextp
http://wiki.freepascal.org/ATTabs
Win10 LTSC x64/Deb 11 amd64(gtk2/qt5)/Darwin Cocoa (Monterey):
Lazarus x32/x64 2.3(trunk); FPC 3.3.1 (trunk), FireBird 3.0.10; IBX by TonyW

Sorry for my bad English, I'm using translator ;)

jptferreira

  • New Member
  • *
  • Posts: 18
Re: TPageControl cross-platform question
« Reply #19 on: February 02, 2021, 06:01:48 pm »
I want to thank all for the replies. I'm almost done with the project and will then use ATTabs (just because of Windows :( ).
Best regards

JP

 

TinyPortal © 2005-2018