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 15:44:39
 
 
À
03/07/1997 15:30:45
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00038535
Message ID:
00038593
Vues:
44
>>>>>>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
>
>Do you mean the SKIP FOR area? This is the one that I am referring to. In the item's SKIP FOR area, say something like 'oAPP.formalreadyon = .T.'. Then when you load the form (either in the form's init, or in the menu procedure itself) say 'oAPP.formalreadyon = .T.' The next time the user goes to the menu, the SKIP FOR option evaluates the flag, and decides whether or not to enable the option.
>
>Erik

Erik - yes, it works...that is better than naming the PAD in the menu and
calling that name with SET SKIP OF PAD...thanks again...rob
Robert Keith
Independent Developer
San Antonio, Texas
E-mail address:
rebelrob1@yahoo.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform