PUSH POPUP Command
Places a menu definition on a stack of menu definitions in memory.
PUSH POPUP MenuName
Parameters
- MenuName
-
Specifies the name of the menu whose definition is placed on the stack. The menu can also be a Visual FoxPro system menu.
When used with POP POPUP, PUSH 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 last-in, first-out order. Menu definitions take up memory, so every PUSH POPUP should have a corresponding POP POPUP to make sure your application's memory usage does not grow unnecessarily.
In the following example, a menu named popExam is created. The menu definition is pushed to the stack and then modified. The original menu 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 'Original Popup' WINDOW RELEASE BAR 2 OF popExam WAIT 'Modified Popup. Original Popup is pushed to a stack.' WINDOW POP POPUP popExam WAIT 'Original Popup restored' WINDOW DEACTIVATE POPUP popExam RELEASE POPUP popExam
Reference
ACTIVATE POPUP CommandDEFINE POPUP Command
POP POPUP Command