00 Votes

Lazarus: Jump with Enter Key into next Row of StringGrid

Question by Guest | 2016-02-13 at 11:11

I am using the TStringGrid component in Lazarus and I have set the property Options -> goEditing to TRUE so that you are able to edit the content of the cells.

If you press the enter key in one of those cells, the focus is automatically jumping into the next cell. However, the focus is jumping to the next cell on the right and not into the next row or the next line below as expected.

How can I set that when the enter key is pressed during editing, it is jumped into the cell below the last cell instead of the cell on the right of it?

ReplyPositiveNegative
0Best Answer0 Votes

The StringGrid has the property AutoAdvance. The default of this property is aaRight which is resulting in your described behavior.

Set this property to aaDown to ensure that the cursor is jumping down instead of right.
2016-02-13 at 16:43

ReplyPositive Negative
Reply

Related Topics

Delphi: System-Wide HotKey

Tutorial | 1 Comment

Important Note

Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.

Participate

Ask your own question or write your own article on askingbox.com. That’s how it’s done.