DefGrid


The DefGrid method attaches the default grid window pane that opens from the Script Editor and returns its CGrid object. To create a new, independent grid window, use NewGrid instead. To attach an existing grid window, use AttachGrid.

Syntax

G = DefGrid()

where

    G is the CGrid object attached to the default grid pane on the Script Editor window

  

A default grid pane and its CGrid object are created when the Script Editor is created. The default grid is set to 3 columns x 50 rows but this size can be changed as can the other parameters of the grid.

Example

The following script attaches the default grid pane and sets its size to 4 columns x 10 rows:

G = DefGrid()

-- Attach the default CGrid object

c = G:GetCols()

-- Get the number of grid columns

r = G:GetRows()

-- Get the number of grid rows

r = G:GetSheets()

-- Get the number of grid sheets

Printf("Grid: %dx%dx%d\n", c, r, s )

- Result: Grid: 3x50x1

Related Topics

NewGrid

AttachGrid

CGrid class