CGrid:DeleteMenus


The DeleteMenus method removes all script commands from the pop-up menu of the modeless grid dialog.

Syntax

CGrid:DeleteMenus()

Example

The following script removes all script commands, including "Execute Script" from the grid dialog's pop-up menu. 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

-- do other things to the CGrid object

 

G:DeleteMenus()

-- remove all menu commands

D = new_griddlg(G)

-- open the modeless grid dialog

Related Topics

CGrid class, AddMenu, new_griddlg


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