Forum > General

[Solved] Stringgrid add new row when TAB is clicked



If I put a TStringgrid on a form and only supplement the options with:
--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---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

Solved: Hiding a column changes the behavior of the tab key.


[0] Message Index

Go to full version