Which comes first in a 2D array, rows or columns?

前端 未结 9 715
小鲜肉
小鲜肉 2020-12-07 12:53

When creating a 2D array, how does one remember whether rows or columns are specified first?

9条回答
  •  既然无缘
    2020-12-07 13:40

    In TStringGrid cells property Col come first.

    Property Cells[ACol, ARow: Integer]: string read GetCells write SetCells;
    

    So the assignment StringGrid1.cells[2, 1] := 'abcde'; the value is displayed in the third column second row.

提交回复
热议问题