CGridView:new
The new method constructs a new instance of a CGridViewobject. This object is an interface to a grid window on the Mira desktop that can be manipulated using methods in the CGridView class. The CGridView object may also be constructed using the new_gridview function.
When a new CGridView object is created, rather than attached to an existing window, the grid dimensions in columns and rows and other parameters are normally initialized using the GridParams table. See the Example below.
G = CGridView:new( strName )
Creates a CGridView with window title strName and grid properties initialized to default values.
G = CGridView:new( strName, GridParams )
Creates a new CGridView object with window title strName and grid properties initialized to the properties in a GridParams table.
The following script creates a CGridView 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 CGridView with properties in params |
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics,
Inc. All Rights Reserved.