Delphi: prevent H and V scrolling of a grid
$30-5000 USD
Paid on delivery
please see the attach video.
If I play with the mouse wheel or with the arrows keys or click the 2nd grid row, the grid vertically scrolls.
The same would happen in the horizontal plane if the grid had more columns.
I want to prevent this.
I always want
grid.top=0 and
grid.left=0
I tried all sort of tricks inside OnTopLeftChanged event but had no success.
The grid I am using is of type TProfGrid (free trial at [url removed, login to view]), but I guess that its behaviour here is the same as a standard TStringGrid.
The trick you suggest must work with Delphi 5.
As far as I could understand this is done properly handling messages WM_HSCROLL and WM_VSCROLL.
I was able to disable scrolling due to arrows key and to mouse wheel, but the scrolling due to a mouse click beats me.
Project ID: #3924635