Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to assign a value when button clicked
Message
From
02/04/2003 14:35:20
 
 
To
02/04/2003 13:35:30
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00773122
Message ID:
00773159
Views:
18
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform