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 13:35:48
 
 
À
03/07/1997 13:32:17
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00038535
Message ID:
00038569
Vues:
41
>>>>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

Erik is right. I would add one thing only: your 'start form' procedure should either load the form, or (if form already exists) activate (set focus) it (in a case of multiple-form interface).
Edward Pikman
Independent Consultant
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform