User`s guide

If event[0] is 14, a click on a menu bar selection was detected, in which case:
If event[1] is 0, a click has been made to the top-level menu bar. In this case,
an FSET instruction must be executed to display the pull-down
options under the menu bar selection and event[2] is the number
(from left to right) of the menu bar option selected.
If event[1] is 1, then a selection from a pull-down menu has been made and
event[2] is the number of the pull-down option selected.
You cannot use the GETEVENT instruction to specify which events to monitor. It monitors all
the events that are enabled for the window. For details on using the /EVENT argument for
enabling and disabling the monitoring of various events, see the documentation for the
FOPEN and FSET program instructions in the V+ Language Reference Guide.
FSET Instruction
FSET is used to alter the characteristics of a window opened with an FOPEN instruction, and
to display pull-down menus. We are going to describe only the use of FSET to create the top-
level menu bar, create the pull-down menu selections below the top-level menu, and initiate
monitoring of events. The instruction for displaying a top-level menu is:
FSET (glun) " /MENU 'item1' 'item2' ... 'item10' "
glun is the logical unit of the window the menu is displayed in.
item1-item10 are the menu titles for a top-level bar menu. The items appear
from left to right.
The instruction to display a pull-down menu (called when event[0] = 14 and event[1] = 0)
is:
FSET (glun) "/PULLDOWN", top_level#," 'item1' ... ' itemn '"
top_level# is the number of the top-level selection the pull-down menu is to appear
under.
item1-
itemn
are the menu items in the pull-down menu. The items appear from top
to bottom.
The relationship between these two uses of FSET will become clear when we actually build a
menu structure.
The basic FSET instruction for monitoring menu and mouse events is:
FSET (glun) "/EVENT BUTTON MENU"
Monitoring Events
(Undefined variable: Primary.Product_Name_V)Language User's Guide, version
17.x
Page 249