Recent

Author Topic: Grid scrollbar issue  (Read 794 times)

Handoko

  • Hero Member
  • *****
  • Posts: 5153
  • My goal: build my own game engine using Lazarus
Grid scrollbar issue
« on: November 06, 2020, 04:41:29 pm »
Tested on Lazarus 2.0.10 GTK2 - Ubuntu Mate, stringgrid's horizontal scrollbar won't disappear. Steps to reproduce the issue:

1. Run the code
2. Resize until the horizontal scrollbar shows up
3. Resize back to the wider width
4. But the horizontal scrollbar won't disappear

Vertical scrollbar does not have the problem. This issue does not happen on Wine-Windows and WinXP. Can you reproduce the issue on your system? Is it a bug?

Code: Pascal  [Select][+][-]
  1. unit Unit1;
  2.  
  3. {$mode objfpc}{$H+}
  4.  
  5. interface
  6.  
  7. uses
  8.   Classes, Forms, Controls, Grids, StdCtrls;
  9.  
  10. type
  11.  
  12.   { TForm1 }
  13.  
  14.   TForm1 = class(TForm)
  15.     StringGrid1: TStringGrid;
  16.     procedure FormCreate(Sender: TObject);
  17.   end;
  18.  
  19. var
  20.   Form1: TForm1;
  21.  
  22. implementation
  23.  
  24. {$R *.lfm}
  25.  
  26. { TForm1 }
  27.  
  28. procedure TForm1.FormCreate(Sender: TObject);
  29. begin
  30.   with StringGrid1 do
  31.   begin
  32.     Anchors    := [akTop, akLeft, akBottom, akRight];
  33.     ColCount   := 3;
  34.     FixedCols  := 0;
  35.     FixedRows  := 0;
  36.     ScrollBars := ssAutoBoth;
  37.   end;
  38. end;
  39.  
  40. end.
« Last Edit: November 06, 2020, 05:02:50 pm by Handoko »

sstvmaster

  • Sr. Member
  • ****
  • Posts: 299
Re: Grid scrollbar issue
« Reply #1 on: November 06, 2020, 04:45:03 pm »
Hi Handoko,

Windows 10, Lazarus 2.0.10, OK!
greetings Maik

Windows 10,
- Lazarus 2.2.6 (stable) + fpc 3.2.2 (stable)
- Lazarus 2.2.7 (fixes) + fpc 3.3.1 (main/trunk)

bpranoto

  • Full Member
  • ***
  • Posts: 134
Re: Grid scrollbar issue
« Reply #2 on: November 06, 2020, 05:38:51 pm »
Can you reproduce the issue on your system?

Yes. I can reproduce in my system:

O/s: ubuntu 18.04 - 64bit
Desktop Environment: gnome3
fpc: 3.2.0
lazarus: 2.0.10

tetrastes

  • Sr. Member
  • ****
  • Posts: 481
Re: Grid scrollbar issue
« Reply #3 on: November 06, 2020, 09:14:11 pm »
Debian 10.6 64-bit, Xfce, KDE.
FPC 3.2.0, Lazarus 2.1.0.
The issue is reproduced with gtk2, is not with qt5.

 

TinyPortal © 2005-2018