popupbutton
LIST
,
INITIAL
,
CHOICE

The popupbutton statement displays a pop-up menu in response to clicking on a button.


Parameters

This statement has three parameters:

list – Carriage return separated array of choices to appear in pop-up menu.

initial – Initial choice to be selected in pop-up menu (or "" if no choice).

choice – Item user selected in pop-up menu (or "" if no choice). Note: If the menu was constructed with identifiers you can also use the info(“menuidentifier”) function to determine the chosen menu item.


Description

This statement can be used to produce a pop-up menu in response to clicking on a button. The menu will pop-up over the button that was pressed. It is intended that this statement be used in a procedure that is triggered by a button on a form (or any form object that triggers a procedure). The procedure must be triggered on mouse down, not mouse up.

Here is an example that displays a pop-up menu with three colors when the button is clicked.

local colorChoice
popupbutton "Red"+cr()+"Green"+cr()+"Blue","Red",colorChoice
// colorChoice now contains the color name

See Also


History

VersionStatusNotes
10.0No ChangeCarried over from Panorama 6.0.