Recent

Author Topic: TPageControl: MultiLine behave different on Win and Linux  (Read 2902 times)

fuzzy

  • Newbie
  • Posts: 5
TPageControl: MultiLine behave different on Win and Linux
« on: March 05, 2018, 08:34:20 pm »
Hi Folks!

I'm programming an Application that needs to run on Win and Linux.
On the form I use a TPageControl with many tabs so that Multiline would be a great option, if it would work on both systems.
On the Win-PC (actually it is ReactOS!) everything works as expected.
The problem is that on my Linux-Box (Debian unstable) the tabs of the PageControl only appear in one line.

I develop the application on the Debian-Box with Lazarus 1.8.2 / Free Pascal 3.0.4
To compile for win I copy the sources to my VirtualBox ReactOS-Installation with Lazarus 1.6.4 / Free Pascal 3.0.0

Can anyone see the same effect that PageControl doesn't support Multiline on Linux?
Or is there a setting-option I don't see?

Thanks in advance!

  Fuzzy

howardpc

  • Hero Member
  • *****
  • Posts: 4144
Re: TPageControl: MultiLine behave different on Win and Linux
« Reply #1 on: March 05, 2018, 08:56:02 pm »
For me on linux gtk2 widgetset a pagecontrol's tabsheets show correctly multi-lined, irrespective of TabPosition.
The pagecontrol MultiLine property is True, and the pagecontrol's Options include nboMultiline.
The tabsheet's Caption is something like 'line1'#10'line2'.

fuzzy

  • Newbie
  • Posts: 5
Re: TPageControl: MultiLine behave different on Win and Linux
« Reply #2 on: March 05, 2018, 09:22:45 pm »
Thanks for the quick reply, howardpc!

In the objectinspector the Property "MultiLine" is set to true
and then the Options include [nboMultiline]. This is included in the main.lfm too.
As already said: The *.pas and *.lfm on both systems are exactly the same!

What do you mean with
Quote
The tabsheet's Caption is something like 'line1'#10'line2'.

Surely the tabsheets have captions, but where do you think the "#10" belongs?

  Fuzzy

fuzzy

  • Newbie
  • Posts: 5
Re: TPageControl: MultiLine behave different on Win and Linux
« Reply #3 on: March 05, 2018, 09:39:32 pm »
to clearify the problem:
I created a form with a PageControl and added six Tabs "TabSheet1 .. TabSheet6".
In the attachments there are the screenshots taken of the Applications on win and Linux.
Both were build with exactly the same code!

When I set MultiLine to true I expect the version as on win.

howardpc

  • Hero Member
  • *****
  • Posts: 4144
Re: TPageControl: MultiLine behave different on Win and Linux
« Reply #4 on: March 05, 2018, 10:05:37 pm »
Code: Pascal  [Select][+][-]
  1. procedure TForm1.FormCreate(Sender: TObject);
  2. begin
  3.   PageControl1.Pages[0].Caption := 'Line1'#10'line2';
  4. end;

fuzzy

  • Newbie
  • Posts: 5
Re: TPageControl: MultiLine behave different on Win and Linux
« Reply #5 on: March 05, 2018, 10:42:27 pm »
You described how to set the caption of tabs with text that includes a linefeed.
That is not what I understand when talking about MultiLine of a PageControl.

I don't want to scroll through the TabSheets, I want to see all TabSheets at once
in my application on my favorite operating-system!

wp

  • Hero Member
  • *****
  • Posts: 11923
Re: TPageControl: MultiLine behave different on Win and Linux
« Reply #6 on: March 05, 2018, 10:53:30 pm »
When I set MultiLine to true I expect the version as on win.
This is a well-known limitation: Look at the tab "Restrictions" in the object inspector, when a pagecontrol is selected. You see "Multiline" listed along with the gtk, gtk2. qt and carbon icons (right-click on them > "View restricted properties" to see a legend).

Howard, I think the OP is talking about multiline in the sense of "multiple tab rows", not in the sense of "multiple lines of text in a tab"

fuzzy

  • Newbie
  • Posts: 5
Re: TPageControl: MultiLine behave different on Win and Linux
« Reply #7 on: March 05, 2018, 11:11:03 pm »
Thanks for the hint, wp!

That is the point I didn't see.
Where can I read about this and/or other "well-known" Limitations on different target-systems?

howardpc

  • Hero Member
  • *****
  • Posts: 4144
Re: TPageControl: MultiLine behave different on Win and Linux
« Reply #8 on: March 05, 2018, 11:29:45 pm »
Where can I read about this and/or other "well-known" Limitations on different target-systems?

As wp says, on the "Restricted" page of the object inspector. Or, for a better summary probably via View-> Restriction Browser

 

TinyPortal © 2005-2018