Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Where did Click initiated?
Message
 
 
À
09/08/2012 08:29:42
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01550194
Message ID:
01550201
Vues:
41
>>Hi,
>>
>>I need to determine in the Click method of a button if this click was done by a user (mouse click) or some other part of the program called cmdThisButton.click() programmatically. Is this possible? TIA.
>
>:o)
>That is why Events must call methods.
>Move all code from Click() to some custom event.
>Than its easy:
>Add parameter to this methiod that will show you from where it is called.
>I.e. from Button.Click call this method that way:
>
>thisForm.MyButtonClickHandler(.t.)
>
>* and from everywhere else:
>
>thisForm.MyButtonClickHandler(.f.) && or thisForm.MyButtonClickHandler()
>
Thank you. Good suggestion (echoes what Craig said too). Why didn't you all tell me about this years ago? :)
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform