Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding a new Pad to Top Level Form Menu
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Menus & Menu designer
Title:
Adding a new Pad to Top Level Form Menu
Miscellaneous
Thread ID:
00635601
Message ID:
00635601
Views:
56
I have no problems getting my menu running in a top level form. The probelm I have is getting a new menu pad inserted before an existing pad on this menu. I tried creating this with the menu designer but it failed even when I call this menu from a method in the TLF using do (tcMenuName) with This, This.Name

The problem is it replaces my TLF main menu. I checked the box in the General Options for Top Level form and the option for Before and gave the name of the pad to insert this before. Before I migrated to using a top level form, all the code I needed to do this was
local lnKount, i, lcPad
lnKount = cntpad("_msysmenu")
for i = 1 to lnKount
	lcPad = getpad("_msysmenu", i)
	if upper(lcPad) = "_PERMITGEN"
		return
	endif
endfor

DEFINE PAD _PermitGen OF _MSYSMENU BEFORE _Help ;
	PROMPT "\<Permits" COLOR SCHEME 3 KEY ALT+P, ""
ON PAD _PermitGen OF _MSYSMENU ACTIVATE POPUP PermitGen

DEFINE POPUP PermitGen MARGIN RELATIVE SHADOW COLOR SCHEME 4

DEFINE BAR 1 OF PermitGen PROMPT "Cover Letter"
DEFINE BAR 2 OF PermitGen PROMPT "Fact Sheet"
DEFINE BAR 3 OF PermitGen PROMPT "Permit"

ON SELECTION BAR 1 OF PermitGen oApp.DoForm("CoverLetter", "frmCoverLetter")
ON SELECTION BAR 2 OF PermitGen oApp.DoForm("FactSheet", "frmFactSheet")
ON SELECTION BAR 3 OF PermitGen oApp.DoForm("PermitDoc", "frmPermitDoc")

RETURN
Any enlightenment will be most appreciated. TIA!
Mark McCasland
Midlothian, TX USA
Next
Reply
Map
View

Click here to load this message in the networking platform