Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Managing form specific menu
Message
De
13/07/1998 13:19:08
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
13/07/1998 12:55:11
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00116804
Message ID:
00116838
Vues:
17
Bob,
I think to overcome it you could use different names for menus and keep them in form custom prop later to "pop menu thisform.cMenuname" when activated once. Or alternatively one central menu with a parameter hold all form menus.
*One menu
*Central.mpr
lparameters loForm
if _screen.comment = loForm.name && Already active menu
   return
endif
do case
   case loForm.name = "frmEntry"
      define pad of mymenu ....
    ....
endcase
set sysmenu to mymenu
deactivate menu mymenu
activate menu mymenu  && activate Redefined menu
*Form.activate
do central.mpr with this
Also alternatively pads and bars could be changed indiviually on the fly but complex to handle if all forms would have different menus (then keep pads and bars etc in a table and use a generic menu routine ?). In this case a better alternative would be SDI forms with their own set of menus. Unfortunately I use simple menus and skipfor series and so can only say it in theory.
Cetin

>This works, except I was hoping to have the menu disappear/reappear when I clicked on other forms. The only way I could get it to work was:
>
>*Activate
>IF !THISFORM.MenuActive
>PUSH MENU _msysmenu
>DO menu1.mpr
>THISFORM.MenuActive = .T.
>ENDIF
>
>*Deactivate/Destroy
>IF THISFORM.MenuActive
>POP MENU _msysmenu
>THISFORM.MenuActive = .F.
>ENDIF
>
>This seems to work, but I feel like I'm doing things wrong, since I'm having to run the menu many times. Also, the deactivate events don't fire 1:1 with the activate events, so I have that form prop (MenuActive) to keep things sync'd.
>
>Bob
>
>>Bob,
>>I don't play with menus much but I think it should be something like :
>>*Init
>>Push menu _msysmenu && or menuname
>>do newmenu.mpr
>>*destroy
>>pop menu _msysmenu
>>Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform