Recent

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

jptferreira

  • New Member
  • *
  • Posts: 18
TPageControl cross-platform question
« on: May 23, 2019, 10:52:48 pm »
When porting the code from linux to a windows installation all works great but the TPageControl doesn't show correctly under windows.
Because I selected to the the tabs on the left side, on linux it shows great with the tabs horizontal. On Windows it shows vertically and with the too and that makes it harder to read. At the same time it ruins the layout because it adjust the pagecontrol content.
Any hint on why this happens? Is there any workaround to have the windows layout to be kept the same as linux?
Thanks! ;)

jamie

  • Hero Member
  • *****
  • Posts: 6090
Re: TPageControl cross-platform question
« Reply #1 on: May 23, 2019, 11:00:18 pm »
are you referring to the "TEXT" in the tabs not being horizontal ?
The only true wisdom is knowing you know nothing

jptferreira

  • New Member
  • *
  • Posts: 18
Re: TPageControl cross-platform question
« Reply #2 on: May 23, 2019, 11:20:54 pm »
Not just the text, even the tabs become vertical while on linux they are horizontal even if on the left, top or bottom.
Even just creating a new TPageControl and moving the tabs to the left will do that, instead of keeping the same orientation, it just changes to horizontal... I'm puzzled! Can be that I'm too tired and cannot see the most obvious! Thanks for your reply

 :D

RAW

  • Hero Member
  • *****
  • Posts: 868
Re: TPageControl cross-platform question
« Reply #3 on: May 23, 2019, 11:23:03 pm »
A picture says more than 1000 words ...  :)
Windows 7 Pro (x64 Sp1) & Windows XP Pro (x86 Sp3).

jamie

  • Hero Member
  • *****
  • Posts: 6090
Re: TPageControl cross-platform question
« Reply #4 on: May 24, 2019, 12:08:19 am »
That problem has been around for a while now..

I fyou set the width of the tabs while they are vertical they kind of do the opposite of what you think.

it's how you think about it..

 Think of the TABS as being rotated as you'll also notice the text is vertical, up for the left and down for the right.

 The Tab widths and height rotate with it in their origination.

 I believe this is how windows implements it..

« Last Edit: May 24, 2019, 12:15:51 am by jamie »
The only true wisdom is knowing you know nothing

wp

  • Hero Member
  • *****
  • Posts: 11857
Re: TPageControl cross-platform question
« Reply #5 on: May 24, 2019, 12:43:26 am »
Any hint on why this happens? Is there any workaround to have the windows layout to be kept the same as linux?
The pagecontrol is a control which depends strongly on the widget set. I checked several component packages but did not find a pagecontrol-like component in which the tabs can be moved to the left and the text remains horizontal. Maybe you can combine some kind of vertical menu component (such as JVCL's TOutlookbar, or maybe even a TListbox could be sufficient) with a TNotebook.

jamie

  • Hero Member
  • *****
  • Posts: 6090
Re: TPageControl cross-platform question
« Reply #6 on: May 24, 2019, 01:59:26 am »
The TTabControl if set to LEFT, and with MULTILINE on, will cascade the Tabs down the side with text horizontal.

You can place this beside a TNoteBook and construct what you need.

TPageControl also has this however, the Multiline does not seem to have any effects when doing so?
The only true wisdom is knowing you know nothing

lucamar

  • Hero Member
  • *****
  • Posts: 4219
Re: TPageControl cross-platform question
« Reply #7 on: May 24, 2019, 03:40:21 am »
A picture says more than 1000 words ...  :)

Enjoy these 2000 words :)
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

RAW

  • Hero Member
  • *****
  • Posts: 868
Re: TPageControl cross-platform question
« Reply #8 on: May 24, 2019, 05:14:37 am »
Quote
Enjoy these 2000 words :)
:D

Interesting, I've never seen this kind of bug.
// That's not a standard XP Theme ... is it ???
Windows 7 Pro (x64 Sp1) & Windows XP Pro (x86 Sp3).

lucamar

  • Hero Member
  • *****
  • Posts: 4219
Re: TPageControl cross-platform question
« Reply #9 on: May 24, 2019, 07:46:44 am »
// That's not a standard XP Theme ... is it ???

No, it is Crystal dlb 2.
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1106
Re: TPageControl cross-platform question
« Reply #10 on: May 24, 2019, 09:10:04 am »
When porting the code from linux to a windows installation all works great but the TPageControl doesn't show correctly under windows.
Because I selected to the the tabs on the left side, on linux it shows great with the tabs horizontal. On Windows it shows vertically and with the too and that makes it harder to read. At the same time it ruins the layout because it adjust the pagecontrol content.
Any hint on why this happens? Is there any workaround to have the windows layout to be kept the same as linux?
Thanks! ;)

Not just the text, even the tabs become vertical while on linux they are horizontal even if on the left, top or bottom.
Even just creating a new TPageControl and moving the tabs to the left will do that, instead of keeping the same orientation, it just changes to horizontal... I'm puzzled! Can be that I'm too tired and cannot see the most obvious! Thanks for your reply  :D

A picture says more than 1000 words ...  :)
Attached is the default behavior for Windows 7 and 10.

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1106
Re: TPageControl cross-platform question
« Reply #11 on: May 24, 2019, 09:11:16 am »
Any hint on why this happens? Is there any workaround to have the windows layout to be kept the same as linux?
The pagecontrol is a control which depends strongly on the widget set. I checked several component packages but did not find a pagecontrol-like component in which the tabs can be moved to the left and the text remains horizontal. Maybe you can combine some kind of vertical menu component (such as JVCL's TOutlookbar, or maybe even a TListbox could be sufficient) with a TNotebook.

Quote
Enjoy these 2000 words :)
:D
Interesting, I've never seen this kind of bug.
// That's not a standard XP Theme ... is it ???
Neither do I.
As wp said,  I don't see it as bug, but as a simple different behavior between Windows and Linux's widget sets.
Maybe jptferreira should use other component to behave differently on Windows.

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1106
Re: TPageControl cross-platform question
« Reply #12 on: May 24, 2019, 09:49:11 am »
The TTabControl if set to LEFT, and with MULTILINE on, will cascade the Tabs down the side with text horizontal.
You can place this beside a TNoteBook and construct what you need.
It's not beautiful, but both TPageControl + TNotebook and TTabControl + TNotebook simulates the expected Linux behavior on Windows.
See attached first small sample.

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1106
Re: TPageControl cross-platform question
« Reply #13 on: May 24, 2019, 09:49:57 am »
The TTabControl if set to LEFT, and with MULTILINE on, will cascade the Tabs down the side with text horizontal.
You can place this beside a TNoteBook and construct what you need.
It's not beautiful, but both TPageControl + TNotebook and TTabControl + TNotebook simulates the expected Linux behavior on Windows.
See attached second small sample.

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1106
Re: TPageControl cross-platform question
« Reply #14 on: May 24, 2019, 09:50:48 am »
TPageControl also has this however, the Multiline does not seem to have any effects when doing so?
See default behavior on Windows for TPageControl.MultiLine on attached image.

 

TinyPortal © 2005-2018