Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dynamic Menus - Changing the caption on the menu
Message
De
24/06/1999 23:51:55
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de menu & Menus
Divers
Thread ID:
00233715
Message ID:
00233821
Vues:
29
>Mike i tried this but when i recompile the code goes back to what it originally was. Any suggestions.
>
>TIA
>Shawn

PMFJI: But: We actually use no MPRs in our application, but build the menu using a table, and issuing each menu choice definition as we scan thru the table of choices. (Something like:

(for each record in the menu choices table)

DEFINE PAD &jcModule. OF _MSYSMENU ;
PROMPT jcMprompt ;
STYLE 'B' ;
FONT 'Arial', 10 ;
MESSAGE jcMod_Descr ;
KEY &jc_Hotkey., ""

ON PAD &jcModule. OF _MSYSMENU ACTIVATE POPUP &jcModule.

then:

IF jn_Bar_No = 1
DEFINE POPUP &tc_SubMenu.
ENDIF

DEFINE BAR jn_Bar_No OF &tc_SubMenu. ;
PROMPT jc_Prompt ;
STYLE 'B' ;
FONT 'Arial', 10 ;
MESSAGE jc_BarMsg

* call the usage logger, which invokes the module itself...
ON SELECTION BAR jn_Bar_No OF &tc_SubMenu. ;
DO [&jcmodule.]


or some such... The table has fields for menu choice name, program module to run, menu prompt for the message line, and index fields for the right order to build the drop-downs...

By using SQL selects with a user permissions table, this allows us to only show choices applicable for each user and avoid 'dimming them out'. It also could be used to allow your users to edit the descriptions. If this sounds like what you want, and more info is needed, I'll dig out our early demo/test version used to see if this would even work and e-mail it to you. I'm not sure I can send the final version due to client proprietary info concerns.

HTH

Rob
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform