Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to implement Form specific menus
Message
From
29/05/2004 16:48:00
 
General information
Forum:
Visual FoxPro
Category:
Menus & Menu designer
Miscellaneous
Thread ID:
00908271
Message ID:
00908496
Views:
17
Terry-

Thanks for the code. That's exactly what I was looking for.

Dan

>>I've never implemented these and know it's fairly simple but don't want to spend the time to do the trial and error. Can someone point me in the right direction.
>
>It might be helpful to start by typing "HELP DEFINEMENU" in the command window. There is an example there.
>
>Here is some code. Create a form. Make sure it is a TOPLEVEL form. Then, paste this code in the form's init event and run the form!
>
>DEFINE MENU MyMenu IN (thisform.Name) BAR STYLE 'BT' COLOR SCHEME 8
>DEFINE PAD FILE  OF MyMenu PROMPT "File" COLOR SCHEME 3 ;
>	KEY ALT+F, ""
>DEFINE PAD EDIT  OF MyMenu PROMPT "Edit" COLOR SCHEME 3 ;
>	KEY ALT+E, ""
>
>ON PAD FILE OF  MyMenu ACTIVATE POPUP FILE && FILE
>ON PAD EDIT OF  MyMenu ACTIVATE POPUP EDIT && Edit
>
>* Files popup definition
>DEFINE POPUP FILE MARGIN RELATIVE SHADOW COLOR SCHEME 4
>DEFINE BAR 1 OF FILE PROMPT "File \<maintenance" KEY ALT+M,"ALT+M" &&;
>     PICTURE ucpopImageFolder+"file.Bmp" SKIP FOR VARTYPE(frmFileMaintenance)==[O]
>DEFINE BAR 3 OF FILE PROMPT "\-"	
>DEFINE BAR 2 OF FILE PROMPT "C\<ompany setup" KEY ALT+O,"ALT+O" &&;
>     PICTURE ucpopImageFolder+"popCompany.BMP" SKIP FOR VARTYPE(frmCompanySetup)==[O]
>
>* Edit Popup definition
>DEFINE POPUP EDIT MARGIN RELATIVE SHADOW COLOR SCHEME 4
>DEFINE BAR 1 OF EDIT PROMPT "\<Store locations" KEY ALT+T,"ALT+T" &&;
>     PICTURE ucpopImageFolder+"popStores.Bmp" SKIP FOR VARTYPE(frmStores)==[O]
>DEFINE BAR 2 OF EDIT PROMPT "\<Product descriptions" KEY ALT+P,"ALT+P" &&;
>     PICTURE ucpopImageFolder+"popProducts.Bmp" SKIP FOR VARTYPE(frmProductDescriptions)==[O]
>
>ON SELECTION BAR 1 OF FILE MESSAGEBOX([File Maintenance])
>ON SELECTION BAR 2 OF FILE MESSAGEBOX([Company Setup])
>
>ACTIVATE MENU MyMenu NOWAIT
Previous
Reply
Map
View

Click here to load this message in the networking platform