CGridView:SetRect
The SetRect method saves the contents of a 2-dimensional table to cells in a rectangular region of the grid. Also see the related FromTable method.
CGridView:SetRect( tbl, rect )
Where tbl is a 2-dimensional 1-dimensional array with values that are numbers.
rect is a CRect object containing the column and row limits where the lua able will be saved to the grid.
The following script returns the cell contents in columns 4 through 8 and rows 2 through 3:
|
-- create CGridView with default properties |
|
-- create a 1-dimensional array with values that are numbers. |
|
-- create a 5-column table for the first row |
|
-- create a 5-column table for the second row |
|
-- set the contents of columns 4:8, rows 2:3 |
|
-- result: val(5,3) = -6 |
CGridView class, GetRect, SetCol, SetRow, SetStr, FromTable
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics,
Inc. All Rights Reserved.