new_grid
The new_grid function is a non-class version of the CGrid:new method that creates a CGrid object. This object can be opened into a dialog window using new_griddlg or new_griddlgmodal.
When a new CGrid object is created, the grid dimensions in columns and rows and other parameters are initialized using the GridParams table. See the Example below.
G = new_grid()
Creates a CGrid with grid properties initialized to default values.
G = new_grid( GridParams )
Creates a new CGrid object with properties initialized to the properties in a GridParams table.
On failure, nil is returned.
The following script creates a CGrid object using the GridParams table to initialize the grid:
|
-- define the grid properties |
|
|
|
-- create 12 columns |
|
|
|
|
|
|
|
-- create 2 top heading rows |
|
-- each top heading row has a height of 16 |
|
|
|
-- create CGrid with properties in params |
-- assemble the grid |
|
|
-- open the final grid into a modeless dialog |
CGrid class, new, delete, new_griddlg, new_griddlgmodal, GridParams table
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics,
Inc. All Rights Reserved.