Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can I associate 2 bindevents on the same Object
Message
De
16/06/2014 04:24:22
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
15/06/2014 13:51:44
Luis Santos
Biglevel-Soluções Informáticas, Lda
Portugal
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01601859
Message ID:
01601888
Vues:
41
>*-- Manipulador - Classe que manipulará o evento
>DEFINE CLASS Manipulador AS Custom
>PROCEDURE OnDClick
>MESSAGEBOX("Você clicou no RightClick")
>ENDPROC
>ENDDEFINE
>
>The rightClick work perfectly.

Nothing looks wrong here... just two possible problems. One is the scope of the variable holding the reference to your button's parent form - are you sure that it is visible in the context of button's click and rightclick? Usually I keep both the source object and the delegate object as members of the same form, not standalone variables, so they execute in the context of the form (with the added benefit that I can use thisform reference in the code).

The other is that you're trying to catch both click and rightclick, which may be tricky - not sure whether .click shouldn't fire when there's a rightclick. You may be better off binding .mouseUp() and then in your delegated code decide which click was it, left or right, from the nButton parameter. Note that your delegated code would have to have the same parameters.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform