Recent

Author Topic: [Solved] Stringgrid add new row when TAB is clicked  (Read 1527 times)

Hansvb

  • Hero Member
  • *****
  • Posts: 739
[Solved] Stringgrid add new row when TAB is clicked
« on: May 20, 2024, 09:05:09 pm »
Hi,

If I put a TStringgrid on a form and only supplement the options with:
Code: Pascal  [Select][+][-]
  1. StringGrid1.Options := StringGrid1.Options + [goEditing, goAutoAddRows, goTabs];
then the stringgrid automatically creates a new row when you click TAB in the last cell.

If I create a stringgrid dynamically with 2 hidden columns, a new line is no longer automatically created when you click on tab in the last cell. (Same options checked as the default stringgrid component).
It seems to have something to do with the hidden columns. Is that correct or am I doing something else wrong? (If necessary, see the attachment).

Windows + lazarus 3.0
« Last Edit: May 21, 2024, 09:15:46 pm by Hansvb »

Hansvb

  • Hero Member
  • *****
  • Posts: 739
Re: Stringgrid add new row when TAB is clicked
« Reply #1 on: May 21, 2024, 09:15:19 pm »
Solved: Hiding a column changes the behavior of the tab key.


 

TinyPortal © 2005-2018