attach_gridview_by_name CGridView:Attach

new_gridview


The new_gridview function is a non-class version of the CGridView:new method which creates and returns a new CGridView object. This object is an interface to a grid window on the Mira desktop that can be manipulated using methods in the CGridView class.

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.

Syntax

G = new_gridview( strName )

bullet.gif    Creates a CGridView with window title strName and grid properties initialized to default values.

G = new_gridview( strName, GridParams )

bullet.gif    Creates a new CGridView object with window title strName and grid properties initialized to the properties in a GridParams table.

bullet.gif    On failure, nil is returned.

Example

The following script creates a CGridView object using the GridParams table to initialize the grid:

params =

-- define the grid properties

{

 

  nCols = 12,

-- create 12 columns

  nRows = 20,

 

  nSheets = 1,

 

  nSH_Cols = 1,

 

  nSH_Width = 24,

 

  nTH_Rows = 2,

-- create 2 top heading rows

  nTH_Height = 16,

-- each top heading row has a height of 16

}

 

G = new_gridview("My Grid", params)

-- create CGridView with properties in params

Related Topics

CGridView class

new

delete

 


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