Product Documentation
Cadence User Interface SKILL Reference
Product Version IC23.1, September 2023

hiInsertMenuItem

hiInsertMenuItem(
r_hiMenu 
r_menuItem
g_position 
) 
=> t / nil 

Description

Inserts a menu item or action into a specified position of all instances of r_hiMenu.

Arguments

r_hiMenu

Menu created with hiCreateMenu or hiCreatePulldownMenu.

r_menuItem

Menu item description returned from with hiCreateMenuItem or hiCreateSliderMenuItem, or when the action was created with hiCreateAction.

g_position

Symbol or integer specifying the item to insert after. The only way to insert a menu item at the beginning of a menu is to specify position 0. An integer position that is larger than the number of menu items defaults to the end of the menu; a negative position defaults to 0. Any symbol specified must represent the menu item handle used when the menu item was created with hiCreateMenuItem or hiCreateSliderMenuItem.

Values Returned

t

The menu item is inserted.

nil

The menu item is not inserted. An error message is also issued.

Related Topics

Menu Functions

hiCreatePulldownMenu

hiCreateMenu

hiCreateMenuItem

hiCreateSliderMenuItem

hiCreateSeparatorMenuItem


Return to top
 ⠀
X