Re: Again: Stringgrid self shiftup

Posted by webmaster Guido on April 12, 2004 at 15:02:20:

In Reply to: Again: Stringgrid self shiftup posted by Ed on April 12, 2004 at 12:47:49:

: I am displaying a deck of cards with a Stringgrid. 4 rows (one row for each suit), 13 columns. Clicking on a card means playing that card.
: But, at runtime, after a click on the lowest row, the system shifts all the rows up by 1. The former top row is now invisible, and former row n is now at n-1. Very annoying. I did not ask the system to do that.
: The shift up seems to happen at the very end of the event handler. The event handler is my own method. It is assigned to the OnSelectcell event of the stringgrid.
: Any idea how to prevent the shift up?
-------------

If the last row is not completely visible, then it comes fully into view when you click it. Is it this what you mean?
Otherwise, it probably has something to do with what you do in the OnSelectCell event handler. To test this, comment out the code of the OnSelectCell procedure and check if the grid still does scroll up.
Maybe post an example of the OnSelectCell code, so that I can check it out?



Related Articles and Replies:




[ DelphiLand: free Delphi source code, tips, tutorials ]