PROMPT( ) Function

Returns the text for a menu title chosen from a menu bar or for a menu item chosen from a menu.

PROMPT( )

Return Values

Character

Remarks

PROMPT( ) returns the text of the menu title last chosen from a menu bar or the menu item last chosen from a menu. The menu bar or menu can be user-defined or a Visual FoxPro system menu bar or menu. If a menu bar or menu isn't active or you press ESC to exit a menu bar or menu, PROMPT( ) returns an empty string.

A menu bar is created with DEFINE MENU, and each menu title in the menu bar is created with DEFINE PAD. A menu is created with DEFINE POPUP, and the menu items in the menu are created with DEFINE BAR.

MENU( ) and POPUP( ) can be used to return the name of the menu bar or menu from which the menu title or menu item is chosen.

See Also

BAR( ) | DEFINE BAR | DEFINE MENU | DEFINE PAD | DEFINE POPUP | POPUP( ) | PRMBAR( )