Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Menu Pad tied to a Form...
Message
 
 
To
12/10/1998 17:24:04
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00146003
Message ID:
00146081
Views:
43
Hi Bob,

I am not a MM user but I am familiar with Codebook < g >.

cBizObj has a cMenuPad property that during the Init() of the bizobj, something like the following code is executed:
IF !EMPTY(this.cMenuPad) AND TYPE("goApp.oMenu")="O" AND !ISNULL(goApp.oMenu)
   =EVAL("goApp.oMenu."+this.cMenuPad+".Show()")
ENDIF
The reverse occurs in the destroy
...
=EVAL("goApp.oMenu."+this.cMenuPad+".Hide()")
...
You could put the following into the Activate of your form:
IF !EMPTY(this.oBizObj.cMenuPad) AND TYPE("goApp.oMenu")="O" AND !ISNULL(goApp.oMenu)
   =EVAL("goApp.oMenu."+this.oBizObj.cMenuPad+".Show()")
ENDIF
and this into the Deactivate of your form:
IF !EMPTY(this.oBizObj.cMenuPad) AND TYPE("goApp.oMenu")="O" AND !ISNULL(goApp.oMenu)
   =EVAL("goApp.oMenu."+this.oBizObj.cMenuPad+".Hide()")
ENDIF
This should give you the behavior you are requesting.

This presupposes that you have instantiated a menu pad object

Tell me how this works for you.

>>Bob,
>>
>>In the form's Activate method, do PUSH MENU, then your single menu. In the menu designer you can control whether or not it is appended or placed before another pad. In the Deactivate event, issue POP MENU.
>
>Right... but I was more asking if the MM framework already had properties and methods to support this before I went and wrote my own code.
>
>BOb
Rick Hodder
MCP Visual Foxpro
C#, VB.NET Developer
Independent Consultant
www.RickHodder.com
MyBlog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform