Scrolling bug in TStringGrid
Original Reporter info from Mantis: ggeldenhuys
-
Reporter name: Graeme Geldenhuys
Original Reporter info from Mantis: ggeldenhuys
- Reporter name: Graeme Geldenhuys
Description:
While comparing the scrolling behaviour of fpGUI's StringGrid to Lazarus and Delphi, I think I stumbled upon a bug in LCL StringGrid.
Steps to reproduce:
1. Create a new project with widget set = GTK1
2. Drop a TStringGrid on the form
3. Set the following StringGrid properties
Width = 360
Height = 264
RowCount = 17
Options: DrawFocusRect = True
ScrollKeepVisible = True
ScollBars = ssAutoBoth
4. FormCreate event handler as follows... just to make scrolling more visible.
procedure TForm1.FormCreate(Sender: TObject);
var
i: integer;
begin
for i := 0 to Stringgrid1.RowCount-1 do
StringGrid1.Cells[2, i] := IntToStr(i);
end;
5. Run the application.
Test #1 (closed):
Click on a cell in Row 1. Press DOWN arrow until you reach the bottom. Row 16 is fully visible and ScrollBar is at bottom. See image: screenshot-1.png
Test #2 (closed):
Click on a cell in Row 1. Click the DOWN button of the vertical scrollbar until you reach the bottom. Everything works, Row 16 is fully visible and scrollbar is at bottom.
Test #3 (closed): (bug)
Click on a cell in Row 1. Click and Drag the vertical scrollbar thumb button until you reach the bottom. Row 16 is partly visible yet scrollbar is at bottom.
See image: screenshot-2.png
Steps to reproduce:
Steps to reproduce:
1. Create a new project with widget set = GTK1
2. Drop a TStringGrid on the form
3. Set the following StringGrid properties
Width = 360
Height = 264
RowCount = 17
Options: DrawFocusRect = True
ScrollKeepVisible = True
ScollBars = ssAutoBoth
4. FormCreate event handler as follows... just to make scrolling more visible.
procedure TForm1.FormCreate(Sender: TObject);
var
i: integer;
begin
for i := 0 to Stringgrid1.RowCount-1 do
StringGrid1.Cells[2, i] := IntToStr(i);
end;
5. Run the application.
Test #1 (closed):
Click on a cell in Row 1. Press DOWN arrow until you reach the bottom. Row 16 is fully visible and ScrollBar is at bottom. See image: screenshot-1.png
Test #2 (closed):
Click on a cell in Row 1. Click the DOWN button of the vertical scrollbar until you reach the bottom. Everything works, Row 16 is fully visible and scrollbar is at bottom.
Test #3 (closed): (bug)
Click on a cell in Row 1. Click and Drag the vertical scrollbar thumb button until you reach the bottom. Row 16 is partly visible yet scrollbar is at bottom.
See image: screenshot-2.png
Mantis conversion info:
- Mantis ID: 11092
- OS: Ubuntu Linux
- OS Build: 7.04
- Build: v0.9.25 r14596M i386-linux-gtk
- Platform: x86
- Version: 0.9.25 (SVN)
- Fixed in version: 0.9.29 (SVN)
- Fixed in revision: 26739 (#147992e1)
- Target version: 1.0.0
- LazTarget: 1.0