CGridView:SetTab


The SetTab method sets the label for the tab of an existing grid sheet. Tabs are displayed in the tab area below the grid sheets. However, if the grid contains only 1 sheet, the tab row is not displayed. See the sample grid in AddSheet.

Syntax

CGridView:SetTab( nSheet, strLabel )

bullet.gif    Where nSheet, is the index of the tab, starting at 1 for the first sheet.

bullet.gif    strLabel is the string label to assign to the tab.

Example

The following script assigns a new name to the tab for sheet 2:

G = new_gridview("My Grid")

-- Create a CGridView object

-- create 2 sheets for the grid ...

 

if G:GetNumSheets() >= 2 then

-- check that 2 or more sheets exist

  G:SetTab(2, "sheet 2")

-- set the tab label for sheet 2

end

 

Related Topics

CGridView class, AddSheet


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