Delphi: prevent H and V scrolling of a grid

Ακυρώθηκε Αναρτήθηκε Jun 5, 2009 Πληρώθηκε κατά την παράδοση
Ακυρώθηκε Πληρώθηκε κατά την παράδοση

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.

Μηχανολογία MySQL PHP Διαχείριση Πρότζεκτ Αρχιτεκτονική Λογισμικού Δοκιμή Λογισμικού

Ταυτότητα Εργασίας: #3924635

Σχετικά με την εργασία

Απομακρυσμένη εργασία Ενεργό Jun 8, 2009