Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
GENMENUX Capabilities
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de menu & Menus
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01205010
Message ID:
01205013
Vues:
19
>I am trying to enable, disable a menu item without having to exit and re-execute the menu. I have created an appObject oApp.lExistsData which if true allows the menu items to appear, but if false, certain menu items will disappear. I am not sure how to proceed now. I changed the value of the object oApp.lExistsData to TRUE once I had generated data, and thought that this would allow the menu items to now appear, but do you have to re-call the menu or re-execute it?
>
>I hope I am explaining this clearly enough.
>
>Here's the resulting code in the MPR file for the MENU:
>
>
>IF NOT (oApp.lExistsData)
>   RELEASE BAR 3 OF Programs
>ENDIF
>
>
>IF NOT (oApp.lExistsData)
>   RELEASE BAR 4 OF Programs
>ENDIF
>
>
>IF NOT (oApp.lExistsData)
>   RELEASE PAD Admin OF _MSYSMENU
>ENDIF
>
Cecil,

The only way I know to change a menu dynamically is to put the add/release of items in a skip for clause of another menu item
Each time, prior to activating the menu, all the skip for clauses are evaluated. If one of the skip for clause would be
skip for aFunctionOfMine()

function aFunctionOfMine()
  && here I can add/remove anything
   return FALSE
endfunc
You could also put the code in lExistsData_assign()
Gregory
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform