CGridView:GetRect


The GetRect method returns a 2-dimensional 1-dimensional array with values that are numbers. containing the cell values in a rectangular region of columns and rows in the grid.

Syntax

lua_table = CGridView:GetRect( rect )

lua_table = CGridView:GetRect( nColMin, nColMax, nRowMin, nRowMax )

bullet.gif    Where rect is a CRect object containing the column and row limits.

bullet.gif    nColMin, nColMax, nRowMin, and nRowMax are the column and row limits of the rectangle.

bullet.gif    The return value is a 2-dimensional 1-dimensional array with values that are numbers. containing the cell values within the specified rectangle.

bullet.gif    On failure, nil is returned.

Example

The following script returns the cell contents in columns 1 through 3 and rows 4 through 8:

G = new_gridview("My Grid", GridParams)

-- create CGridView with properties in GridParams

tbl = G:GetRect( 1, 3, 4, 8 )

-- returns the contents of cells in [1:3, 4:8]

list(tbl)

-- list the values of the table.

Related Topics

CGridView class, SetRect, GetCol, GetRow, GetStr, ToTable


Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics, Inc. All Rights Reserved.