Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to assign a value when button clicked
Message
De
02/04/2003 14:35:20
 
 
À
02/04/2003 13:35:30
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00773122
Message ID:
00773159
Vues:
17
>I have the email method which is in the formset.
>
>I am calling this method email for in two different command buttons.
>
>thisformset.email(this)
>
>How can i send a value 1 when i click the button one and value 2 when i click second command button:
>
>these buttona are in the two different tabs of page frame which is on the form.

since you already pass an object pointer to .email() you can check in the email() method for any property of the calling button:
* *** in the thisformset.email
LPara ;
   CallingObjPointer

do case
   case Upper(CallingObjPointer.Caption) = "Button1"   && what ever caption you've assigned
      * *** button 1 was pressed - do your stuff
   case Upper(CallingObjPointer.Caption) = "Button2"   && what ever caption you've assigned
      * *** button 2 was pressed - do your stuff
endcase
hope this helps
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform