PopupMenu Command


popupMenu <itemList> at x,y> [with <integer>]


The popupMenu command displays a popup-type menu that contains the return-delimited items listed in <itemList>. The top-left corner of the line specified by <integer> is displayed at the x and y pixel coordinates specified in <x,y>. If the user selects an item from the popup menu by positioning the cursor over the item and releasing the mouse button, the line number of the selected item is placed into the variable it. If no item is selected, zero is returned in it.


On the Macintosh, because pop-up menus display only while the mouse button is depressed, popupMenu cannot be used within a mouseUp handler. On Windows, pop-up menus can be displayed while the mouse button is up, in which case a selection is made by clicking on the desired line of the menu. On pop-up menus displayed while the mouse button is up or displayed at a location not under the mouse pointer, the first line of the menu is highlighted. Pop-up menus that overlap the top or bottom of the screen on Windows do not scroll automatically as they do on the Macintosh.


Add the following handler to a card to display a popup menu of color names wherever the user clicks on the card: on mouseDown "Blue" into menu_list popupMenu menu_list at the mouseLoc if it is not 0 then put line it of menu_list into fld "color name" end if
This text has been mechanically extracted from the Oracle Media Objects MediaTalk Reference, © 1995 Oracle Corporation, and is provided here solely for educational/historical purposes.