new_griddlgmodal CGrid:AddMenuExecute

CGrid:AddMenu


The AddMenu method adds scripts to the pop-up menu for the modeless CGrid Dialog. This feature is available only from the modeless grid dialog created using new_griddlg.

Syntax

CGrid:AddMenu( sMenuTitle, sScriptFile )

bullet.gif    sMenuTitle is the command name to appear in the pop-up menu

bullet.gif    sScriptFile is the full path name of the script file.

Example

The following script adds an "Execute Script" command and two other script commands to the pop-up menu of the modeless grid dialog. The second parameter in AddMenu() should be the full file path to the script. Since thee are normally very long strings, they are shown here in an abbreviated form.

G = new_grid()

-- create a new CGrid object

-- assemble the grid

 

G:AddMenuExecute()

-- add an "Execute Script" command

G:AddMenu("Name 1", C:\\...\\script1.lua")

-- add the command "Name 1" to the menu

G:AddMenu("Name 2", C:\\...\\script2.lua")

-- add the command "Name 1" to the menu

D = new_griddlg(G)

-- open the modeless grid dialog

Related Topics

CGrid class, AddMenuExecute, DeleteMenus, new_griddlg


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