CONTEXTMENU

Top  Previous  Next

Syntax

CONTEXTMENU win as WINDOW, xPos as INT, yPos as INT

Description

Creates and shows a right-click context menu.

Parameters

win - Window or dialog to show menu in.

xPos, yPos - Upper left coordinate of context menu. Normally the mouse position.

Return value

None

Remarks

The items in the context menu use the same format as the BEGINMENU macro. The CONTEXTMENU statement must be paired with an ENDMENU statement to mark the end of the context menu.

See Also: BEGINMENU, ENDMENU, MENUITEM, MENUTITLE, BEGINPOPUP, ENDPOPUP, SEPARATOR, BEGININSERTMENU

Example usage

CONTEXTMENU mywin,@MOUSEX,@MOUSEY
    MENUITEM "Color",0,99
    MENUITEM "Clear",0,1
    BEGINPOPUP "Line Size"
        MENUITEM "1",(linesize = 1) * @MENUCHECK,2
        MENUITEM "2",(linesize = 2) * @MENUCHECK,3
        MENUITEM "3",(linesize = 3) * @MENUCHECK,4
        MENUITEM "4",(linesize = 4) * @MENUCHECK,5
    ENDPOPUP
ENDMENU