Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Vfp50 - How do I GRAY OUT a option in a MENU?
Message
De
03/07/1997 14:25:13
 
 
À
03/07/1997 13:32:17
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00038535
Message ID:
00038582
Vues:
43
>>>>After the user picks an option from the MENU, I would like
>>>>to GRAY OUT that option. How would I do that?
>>>>thanks..
>>>In the menu designer (or with SET SKIP FOR), under options, give an expression in the Skip For box. In the procedure that is fired for that menu item, set that expression to .T.. There is probably an easier way, but this is what I use.
>>>
>>>Erik
>>
>>Erik - SET SKIP FOR PAD mypad _MSYSMENU .T. - this works.
>>the problem is my PAD NAME (mypad) is generated and it changes.
>>How can I get around this?
>
>This is why I usually don't SET SKIP FOR with code. I find it easier to just use the menu editor, and set the expression there. Then it stays with the pad that you assignit to.
>Regarding your other question... do you want disable the menu option when the form is shown to prevent two copies of the same form from being opened simultaneously? If so, instead of disabling the menu option, maybe you should have your menu procedure check to see if a form with that name is already running before DOing the form. This prevents you from having to switch your flag (the one referred to in SKIP FOR) from more than one spot depending on how the user closes the form. Hope this helps.
>
>Erik

How do you set the expression in the menu editor? In the SET FOR area,
I added a variable called "menuoption", but I am not sure how to turn
it on and off from the code? thanks..rob
Robert Keith
Independent Developer
San Antonio, Texas
E-mail address:
rebelrob1@yahoo.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform