How to Return to a Menu's Submenu After a SelectionID: Q137180 2.5x 2.60 2.60a | 2.5x 2.60 2.60a | 2.5x 2.60a
The information in this article applies to:
SUMMARYWhen a user makes a selection from a menu, the menu disappears and then the selection is executed. Some programmers want to have their users returned to the selected menu and submenu with the last choice highlighted. This article gives the steps you need to follow for every menu option you want to return to. NOTE: If a menu is disabled at the time the ACTIVATE POPUP command is issued, it will not activate the last menu. This can occur when you create a Quick Menu and use the default menus supplied by FoxPro. FoxPro will automatically enable and disable menus depending on the current status and environment in FoxPro. For example, the Record menu is enabled only when a database file is open. Clicking an option on this menu runs a procedure that closes the database file in the current work area, the Record menu becomes disabled and the ACTIVATE POPUP command will not be able to redisplay the Record submenu.
MORE INFORMATION
Step-by-Step Procedure1. Create a quick menu. 2. Insert a new menu option on the Edit menu, and set the Result to the 3. In the procedure, enter these statements:
4. Save the menu, and generate the menu code.
5. When you run the menu, the selected option will run, but when it is NOTE: The above procedure calls the menu procedure recursively. If the
procedure is performed more than 32 times, a "Do nesting too deep" error
message may be displayed.
Additional reference words: FoxWin FoxDos FoxMac 2.50 2.50a 2.50b 2.50c 2.60 2.60a Sticky KBCategory: KBSubcategory: FxprgGeneral
|
|
Last Reviewed: May 22, 1998 © 1999 Microsoft Corporation. All rights reserved. Terms of Use. |