Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copying from One menu to another
Message
General information
Forum:
Visual FoxPro
Category:
Menus & Menu designer
Miscellaneous
Thread ID:
00094164
Message ID:
00094622
Views:
23
>>>I have a menu with two pads which I want to use in another menu. They have a lot of menu bars in them. One way is to do it manually, write the prompts and the actions etc. Is there any other way, e.g. they are Foxpro Tables, can't I just copy the records from one to the other? I tried it but to no avail.
>>>
>>>Any body know of a shortcut?
>>>
>>>TIA
>>>
>>>Abdul Ahad
>>
>>First, the menus themselves are stored in tables with a MNX file extension. However, I don't think that's really what you're after here. The menu designer allows you to create a menu with one or more pads. If, for example, you want to append the menu, or insert it at a given point, it allows you to do that too.
>>
>>While the menus aren't object oriented, they're still very powerful, in that they operate on a LIFO stack (Last In, First Out). If you're trying to do something like append a menu when a given form is activated, and change it back when the form is deactivated, it's very simple. Assuming that you have a menu named mymenu.mpr, which is either inserted or append, in the form's activate event you'd insert:
>>PUSH MENU _MSYSMENU
>>DO Mymenu.mpr
>>and all you'd need in the form's Deactivate event is:
>>POP MENU _MSYSMENU
>>to restore the original, and remove yours.
>>
>>Of course, you can also do things like adding, removing, or disabling a menu bar programmatically, and if you PUSH the menu before doing so, all you have to do is POP to restore it.
>>
>>hth,
>
>George,
>Sorry I could not convey my meaning clearly. I want to copy the Menu Pads, their bars, submenus every thing to another menu, maybe in another application during menu design. This may be one pad out of many or multiple pads. Any way of doing this except manual labour?
>

As I mentioned, the definition of the menu is stored in a FoxPro table, which can be manipulated like any other. So moving the individual pad definitions from one menu file to another can be done programmatically.
>TIA
>
>Abdul Ahad
George

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

Click here to load this message in the networking platform