CGrid:new


The new method creates a new grid window and returns its CGrid object. To attach the default CGrid pane that opens from the Script Editort, use DefGrid instead.

Syntax

G = CGrid:new( nCols )

G = CGrid:new( nCols, nRows )

G = CGrid:new( nCols, nRows, nSheets )

G = CGrid:new( CGrid2 )

where

    nCols is the number of columns to set in each sheet.

    nRows is the number of rows to set in each sheet.

    nSheets is the number of sheets to set.

    CGrid2 is an existing CGrid object that will be copied to the new CGrid.

    G is the new CGrid object.

  

This method creates a new instance of a CGrid object using the class itself. You also can create a new CGrid object using the global NewGrid function. Both give the same result.

Example

The following script creates a new grid and sets the grid size to 4 columns x 10 rows and 1 sheet:

 

G = CGrid:new( 4, 10 )

-- Create a new grid window containing a CGrid object

Related Topics

NewGrid

DefGrid

delete

CGrid class