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

hiDisplayMenu

hiDisplayMenu(
r_hiMenu 
[ l_position ] 
) 
=> t / nil 

Description

Displays a menu created by hiCreateMenu, hiCreateSimpleMenu, or hiCreate2DMenu. For non-2D menus, the menu is always displayed at the current cursor’s position at the time hiDisplayMenu is called.

A call to hiDisplayMenu() for 2D menus immediately returns t. However, if you want that the call to hiDisplayMenu() should not return t until the menu is closed (to match the behavior of the previous release), set the menu property dontBlock to nil after creating the menu, as shown below:

MyMenu = hiCreate2DMenu( … )
MyMenu->dontBlock = nil

Arguments

r_hiMenu

The menu returned from a call to hiCreateMenu, hiCreateSimpleMenu or hiCreate2DMenu.

l_position

Optional x, y screen coordinates used for 2D menus. If specified, the 2D menus are displayed with its upper left corner at this position (assuming 0:0 to be the upper left corner of the screen). If not specified, the 2D menu is displayed at the location of the last mouse button click in the window or, if no previous button click has occurred in the window, the exact location is undefined.

Values Returned

t

The menu is displayed.

nil

The menu is not displayed. An error message is also issued.

Examples

The following example uses the hiSetBindKey function to define a bindkey for the Schematics application. The bindkey displays the trExampleMenu pop-up menu. For an example of creating this pop-up menu, see hiCreateSimpleMenu.

hiSetBindKey( "Schematics"
    "Shift Ctrl<Btn2Down> ( 2 )"
    "hiDisplayMenu( trExampleMenu )" )

Related Topics

Menu Functions

hiSetWindowMenu

hiCreate2DMenu

hiCreateSimpleMenu

hiSetBindKey

hiCreateMenuItem

hiCreateSliderMenuItem


Return to top
 ⠀
X