POP POPUP Command
Restores the specified menu definition that was placed on the stack with PUSH POPUP.
POP POPUP MenuName
Parameters
- MenuName
Specifies the name of the menu whose definition is pulled off the stack. The menu can be a user-defined menu created with DEFINE MENU or a Visual FoxPro system menu.
Remarks
When used with PUSH POPUP, POP POPUP makes it possible for you to save a menu definition, make changes to the menu definition, and then restore the menu definition to its original state.
Menu definitions are placed on and removed from the stack in a last-in, first-out order.
Menu definitions take up memory, so every POP POPUP should have a corresponding PUSH POPUP to make sure your application's memory usage does not grow unnecessarily.
Example
In the following example, a menu named popExam
is created. Menu definition is pushed to the stack and then one of the menu items is modified. The original menu definition is then restored by popping it off the stack.
DEFINE POPUP popExam FROM 5,5
DEFINE BAR 1 OF popExam PROMPT 'One'
DEFINE BAR 2 OF popExam PROMPT 'Two'
DEFINE BAR 3 OF popExam PROMPT 'Three'
DEFINE BAR 4 OF popExam PROMPT 'Four'
ACTIVATE POPUP popExam NOWAIT
PUSH POPUP popExam
WAIT 'Popup pushed' WINDOW
RELEASE BAR 2 OF popExam
WAIT 'This is the modified popup' WINDOW
POP POPUP popExam
WAIT 'Popup popped, original popup restored' WINDOW
DEACTIVATE POPUP popExam
RELEASE POPUP popExam
See Also
ACTIVATE POPUP | DEFINE POPUP | POP MENU | PUSH MENU | PUSH POPUP