CGrid:GetNumSheets
The GetNumSheets method returns the number of sheets in the grid. The default grid opens with 1 sheet.
nSheets = G:GetNumSheets()
where
nSheets is the number of sheets to set in the grid. On failure 0 is returned.
Suppose a CGrid G already exists and the number of sheets is not known. The following script determines if the grid has less than 3 sheets:
|
-- if fewer than 3 sheets |
-- |
-- do something |
|
|