Recent

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

sash

  • Sr. Member
  • ****
  • Posts: 266
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.2 FPC 3.0.4 x86_64-linux-gtk2 -- Ubuntu 19.04 XFCE

valdir.marcos

  • Hero Member
  • *****
  • Posts: 823
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: 6235
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).
Lazarus trunk / fpc 3.0.4 / all 32-bit on Win-10

zoltanleo

  • Full Member
  • ***
  • Posts: 188
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
Win7 Ultim x64/Deb 10 amd64 GTK3:
Lazarus x32 2.1(r.62009); FPC 3.3.1 (r.43150),
IBX by -Rik-; FB 3.0.4

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