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?
Related Topics
Delphi/Lazarus: Is the ALT, SHIFT or CTRL key pressed?
Tutorial | 0 Comments
XAMPP: How to set up SSL/HTTPS for local Projects
Tutorial | 4 Comments
Delphi: System-Wide HotKey
Tutorial | 1 Comment
jQuery: Assign Action to Keyboard Keys (Keyboard Event)
Tip | 0 Comments
Delphi/Lazarus: Delete selected Items from ListBox using DEL-Key
Tip | 3 Comments
Delphi/Lazarus: Only allow Numbers in TEdit
Tip | 0 Comments
Delphi/Lazarus: Select all with CTRL+A in ListView
Tip | 0 Comments
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.
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