Delphi: prevent H and V scrolling of a grid

Dibatalkan Dipasang Jun 5, 2009 Dibayar saat pengiriman
Dibatalkan Dibayar saat pengiriman

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.

Teknik MySQL PHP Manajemen Proyek Perancangan Perangkat Lunak Pengujian Perangkat Lunak

ID Proyek: #3924635

Tentang proyek

Proyek online Aktif Jun 8, 2009