Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Inserting menu pad
Message
General information
Forum:
Visual FoxPro
Category:
Menus & Menu designer
Miscellaneous
Thread ID:
00058860
Message ID:
00058897
Views:
30
>>There are a couple of ways, I think to approach this. Since this involves only one pad difference, the way I'd do it is this:
>>
>>I'd first use one menu for form A with all four menu pads. When form B becomes active, I'd:
>>
>>PUSH MENU _MSYSMENU
>>RELEASE PAD [pad2titlename] OF _MSYSMENU
>>
>>When form A reactivates:
>>
>>POP MENU _MSYSMENU
>
>I don't think it will work:
>- Form A is active and Window pad show this form in it list
>- PUSH MENU _MSYSMENU
>- Activate form B
>- Form B is added to the Window list
>- Click on the form A
>- POP MENU _MSYSMENU restore the original menu with only form A in the Window list
>
>Even if I put the PUSH MENU after the form B is activated, I get the same problem if the form B is closed instead of just deactivated.
>
>Any suggestions?

Working with a LIFO stack based mechanism can sometimes get a bit confusing. Let me first see if I can clarify what's going on, prior to a suggestion or two as to how to approach it.

By doing a PUSH MENU... from form A, before B is activated you are saving the definition of exactly what's on the current menu. When you issue the POP, since B hadn't been defined yet, its definition isn't on the menu.

Try adding the PUSH in form B's activate event, release the pad, and the POP in the deactivate event. That should take care of the problem. However, be advised that there will probably be some other issues (what happens if form A isn't active first?) that you may have to address.

hth,

George
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform