Delphi: prevent H and V scrolling of a grid

Törölve Kiadva: Jun 5, 2009 Kiszállításkor fizetve
Törölve Kiszállításkor fizetve

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.

Mérnöki munka MySQL PHP Projektmenedzsment Szoftverarchitektúra Szoftvertesztelés

Projektazonosító: #3924635

A projektről

Távolról teljesíthető projekt Utoljára aktív: Jun 8, 2009