Recent

Author Topic: [Solved]Lazarus_trunk: problems with a draw  (Read 7346 times)

zoltanleo

  • Sr. Member
  • ****
  • Posts: 486
[Solved]Lazarus_trunk: problems with a draw
« on: October 20, 2017, 12:23:12 am »
Hi all.

I placed on the form PageControl and panels. I made a binding of each panel as it is shown on the diagram. Then I made invisible one of panels in runtime.

Code: Pascal  [Select][+][-]
  1. procedure TForm1.FormShow(Sender: TObject);
  2. begin
  3.   Panel2.Visible:= False;
  4. end;
  5.  
  6. procedure TForm1.Button1Click(Sender: TObject);
  7. begin
  8.   Panel2.Visible:= not Panel2.Visible;
  9. end;

After start the form in windows is displayed correctly, but there is a problem with a draw in linux.

Somebody can help to solve a problem. Or it is a bug?
« Last Edit: October 21, 2017, 01:39:53 pm by zoltanleo »
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 ;)

zoltanleo

  • Sr. Member
  • ****
  • Posts: 486
Re: Lazarus_trunk: problems with a draw
« Reply #1 on: October 20, 2017, 12:23:46 am »
more attachments
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 ;)

zoltanleo

  • Sr. Member
  • ****
  • Posts: 486
Re: Lazarus_trunk: problems with a draw
« Reply #2 on: October 20, 2017, 12:24:27 am »
project archive
« Last Edit: October 20, 2017, 12:27:20 am by zoltanleo »
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 ;)

jamie

  • Hero Member
  • *****
  • Posts: 6090
Re: Lazarus_trunk: problems with a draw
« Reply #3 on: October 20, 2017, 01:02:00 am »
With panel2 try setting the left anchor to Panel1 and set your space on the left side to 10 too.

Remove the right anchor of Panel1 that is trying to anchor to Panel2.

 It maybe that the default position of Panel2 is more to the right in windows and in Linux it is
closer to panel1. This could be some issue with scaling etc.

 I've always tried to anchor going left to right, so that each control has it's LEFT anchor set to the previous
control. The last control to the right can then anchor itself to the form or in your case the tabsheet.
The only true wisdom is knowing you know nothing

zoltanleo

  • Sr. Member
  • ****
  • Posts: 486
Re: Lazarus_trunk: problems with a draw
« Reply #4 on: October 20, 2017, 08:50:21 am »
Thanks for the response.

I made quite simple test example. In real application interface elements at me are bound approximately the same as it was specified by you. But it works at windows. And it does not work at linux (Debian gnome & Debian MATE). I think that the problem is interconnected with features of OS.

I hope that here I will receive also the comment of Lazarus developers
« Last Edit: October 20, 2017, 09:40:09 am by zoltanleo »
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 ;)

wp

  • Hero Member
  • *****
  • Posts: 11854
Re: Lazarus_trunk: problems with a draw
« Reply #5 on: October 20, 2017, 12:44:11 pm »
Which widget set? I don't see a problem with Linux Mint 18.1 (KDE) / qt and gtk2.

zoltanleo

  • Sr. Member
  • ****
  • Posts: 486
Re: Lazarus_trunk: problems with a draw
« Reply #6 on: October 20, 2017, 03:05:04 pm »
Which widget set?
gtk2, Debian 9.1 (Gnome classic/MATE) - see my profile

I don't see a problem with Linux Mint 18.1 (KDE) / qt and gtk2.
Try to make so
Code: Pascal  [Select][+][-]
  1. procedure TForm1.FormShow(Sender: TObject);
  2. begin
  3.   Panel2.Visible:= False;
  4.   PageControl1.ActivePageIndex:= 0;
  5. end;
and again to launch the project
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 ;)

Handoko

  • Hero Member
  • *****
  • Posts: 5130
  • My goal: build my own game engine using Lazarus
Re: Lazarus_trunk: problems with a draw
« Reply #7 on: October 20, 2017, 05:09:08 pm »
I tried on Ubuntu Mate 17.04 64-bit Lazarus 1.8.0RC5 Gtk2, the result is the same as the animation of hidden_panel_linux.gif.

Michl

  • Full Member
  • ***
  • Posts: 226
Re: Lazarus_trunk: problems with a draw
« Reply #8 on: October 20, 2017, 08:31:05 pm »
Somebody can help to solve a problem. Or it is a bug?
You can use event TForm1.OnCreate to set visible = false, then it works (tested Linux Mint 17.3 KDE GTK2).

However this is a bug. Please report to bugtracker! (Other controls like TGroupBox are also effected, controls like TButton not. Windows 7 or Qt on same Linux works fine).
Code: [Select]
type
  TLiveSelection = (lsMoney, lsChilds, lsTime);
  TLive = Array[0..1] of TLiveSelection;

zoltanleo

  • Sr. Member
  • ****
  • Posts: 486
Re: Lazarus_trunk: problems with a draw
« Reply #9 on: October 20, 2017, 10:23:03 pm »
I checked too. You are right absolutely.

Somebody issue ticket instead of me. I am afraid, I am not really strong in English. I would be very grateful to this person.
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 ;)

Michl

  • Full Member
  • ***
  • Posts: 226
Re: Lazarus_trunk: problems with a draw
« Reply #10 on: October 21, 2017, 09:41:58 am »
Code: [Select]
type
  TLiveSelection = (lsMoney, lsChilds, lsTime);
  TLive = Array[0..1] of TLiveSelection;

Michl

  • Full Member
  • ***
  • Posts: 226
Re: Lazarus_trunk: problems with a draw
« Reply #11 on: October 21, 2017, 11:06:11 am »
Fixed in trunk. Please try.
Code: [Select]
type
  TLiveSelection = (lsMoney, lsChilds, lsTime);
  TLive = Array[0..1] of TLiveSelection;

zoltanleo

  • Sr. Member
  • ****
  • Posts: 486
Re: Lazarus_trunk: problems with a draw
« Reply #12 on: October 21, 2017, 06:48:00 pm »
Fixed in trunk. Please try.
Đ¡ongratulations! Everything is corrected.

I express huge gratitude to you for the help.

ps. Damn! They broke installation of a packet of onlinepackagemanager.
« Last Edit: October 21, 2017, 07:11:40 pm by zoltanleo »
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 ;)

Michl

  • Full Member
  • ***
  • Posts: 226
Re: [Solved]Lazarus_trunk: problems with a draw
« Reply #13 on: October 21, 2017, 09:11:32 pm »
Thanks.

Damn! They broke installation of a packet of onlinepackagemanager.
Yes. Just tested, I can see it too. I reported the issue https://bugs.freepascal.org/view.php?id=32596
Code: [Select]
type
  TLiveSelection = (lsMoney, lsChilds, lsTime);
  TLive = Array[0..1] of TLiveSelection;

wp

  • Hero Member
  • *****
  • Posts: 11854
Re: [Solved]Lazarus_trunk: problems with a draw
« Reply #14 on: October 21, 2017, 09:37:12 pm »
What if you open the package file directly (lazarus/components/onlinepackagemanager/onlinepackagemanager.lpk) and compile and install it from there (Menu Package > Open package file (*.lpk) ), instead of going through the Install/Uninstall packages dialog?

I had OPM already installed before I made the update; it is still working. I could even uninstall and install it again via Install/Uninstall packages.  This means that the package itself not defective.

 

TinyPortal © 2005-2018