Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I associate 2 bindevents on the same Object
Message
From
16/06/2014 04:24:22
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
15/06/2014 13:51:44
Luis Santos
Biglevel-Soluções Informáticas, Lda
Portugal
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01601859
Message ID:
01601888
Views:
42
>*-- 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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform