View Issue Details

IDProjectCategoryView StatusLast Update
0016102LazarusLCLpublic2010-12-18 18:17
ReporterSven BarthAssigned ToJesus Reyes 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version0.9.28Product Build 
Target Version0.9.30Fixed in Version0.9.29 (SVN) 
Summary0016102: Grid with goSmoothScroll is scrolled when cell is clicked
DescriptionI have a grid that has goSmoothScroll enabled. If I scroll down so that a cell is only partly visible at the top and click on a completly visible cell, the partly visible cell is scrolled up or down, so that it is either completly visible or hidden.
This is a rather annoying behavior especially if you're using large cells and want to catch double clicks, because the selected cell might just have moved out of the click's position and thus a different cell is selected.

I think that this behavior is related to editors, but in my opinion this "scroll to fit" is only useful if the clicked cell is only partly visible (e. g. a cell at the top or the bottom of the visible area). Completly visible cells should not trigger this scrolling.

Note: It get's more absurd if - in the attached example - you scroll down completely and click on the last cell... the cell area is now moved beyond it's normal borders to completely hide the fourth last cell.
(this note might only apply to Win32, because of possible size differences in the attached example between widgetsets)
Additional InformationTested on Win32 and WinCE, but as grid is a custom drawn component this problem might apply to all widgetsets.
Tagsgrids
Fixed in Revision27321, 28645
LazTarget0.9.30
WidgetsetGTK, GTK 2, Win32/Win64, WinCE, Carbon, QT, fpGUI
Attached Files

Activities

2010-03-24 14:05

 

gridclick.zip (2,015 bytes)

Sven Barth

2010-03-24 14:15

manager   ~0036029

I just noticed: The note I mentioned applies only when you use "thumbtracking" to scroll down.

Regards,
Sven

Sven Barth

2010-10-31 23:14

manager   ~0042516

Sorry that it took so long for me to test this...

There is still a case where the grid scrolls when it's not necessary:
If a cell is completely visible, but very near the bottom of the grid's client area, the cell is still scrolled when selected.
To be more precise: the topmost visible cell must only be visible with a small part and the scroll is only triggered by selecting the lowermost visible cell. I can reproduce it in my attached sample application without problems.

Regards,
Sven

Sven Barth

2010-12-18 18:17

manager   ~0044346

Yes, it works now. I weren't able to find anymore cases where the grid is scrolled without need.

Thank you very much.

Regards,
Sven

Issue History

Date Modified Username Field Change
2010-03-24 14:05 Sven Barth New Issue
2010-03-24 14:05 Sven Barth File Added: gridclick.zip
2010-03-24 14:05 Sven Barth Widgetset => GTK, GTK 2, Win32/Win64, WinCE, Carbon, QT, fpGUI
2010-03-24 14:15 Sven Barth Note Added: 0036029
2010-03-24 14:15 Sven Barth Tag Attached: grids
2010-03-24 18:53 Jesus Reyes Status new => assigned
2010-03-24 18:53 Jesus Reyes Assigned To => Jesus Reyes
2010-09-12 07:19 Jesus Reyes Fixed in Revision => 27321
2010-09-12 07:19 Jesus Reyes LazTarget => 0.9.30
2010-09-12 07:19 Jesus Reyes Status assigned => resolved
2010-09-12 07:19 Jesus Reyes Fixed in Version => 0.9.29 (SVN)
2010-09-12 07:19 Jesus Reyes Resolution open => fixed
2010-09-12 07:20 Jesus Reyes Target Version => 0.9.30
2010-10-31 23:14 Sven Barth Status resolved => assigned
2010-10-31 23:14 Sven Barth Resolution fixed => reopened
2010-10-31 23:14 Sven Barth Note Added: 0042516
2010-12-08 08:44 Jesus Reyes Fixed in Revision 27321 => 27321, 28645
2010-12-08 08:44 Jesus Reyes Status assigned => resolved
2010-12-08 08:44 Jesus Reyes Resolution reopened => fixed
2010-12-18 18:17 Sven Barth Status resolved => closed
2010-12-18 18:17 Sven Barth Note Added: 0044346