General information
Category:
Coding, syntax & commands
Title:
How can I associate 2 bindevents on the same Object
Environment versions
Network:
Windows 2008 Server
Hello comunity
I would know if is possible to associate 2 Bindevent on the same object, in my case for click and right click.
I put the code like this but both dont work:
Note: m.ObjRecebido.Janela.painelfundo.page1.obj1 = my button
PUBLIC oManipulador as Manipulador
* - Instancia o objeto manipulador
oManipulador = CREATEOBJECT("Manipulador")
* - Associa o método oManipulador.Onlick com o método Click da _Screen
BINDEVENT(m.ObjRecebido.Janela.painelfundo.page1.obj1,"Rightclick",oManipulador,"OnDClick")
* - Associa o método oManipulador.Onlick com o método Click da _Screen
BINDEVENT(m.ObjRecebido.Janela.painelfundo.page1.obj1,"Click",oManipulador,"OnClick")
*-- Manipulador - Classe que manipulará o evento
DEFINE CLASS Manipulador AS Custom
PROCEDURE OnDClick
MESSAGEBOX("Você clicou no RightClick")
ENDPROC
ENDDEFINE
*-- Manipulador - Classe que manipulará o evento
DEFINE CLASS Manipulador AS Custom
PROCEDURE OnClick
MESSAGEBOX("Você clicou no Click")
ENDPROC
ENDDEFINE
But if i put the code like this:
PUBLIC oManipulador as Manipulador
* - Instancia o objeto manipulador
oManipulador = CREATEOBJECT("Manipulador")
* - Associa o método oManipulador.Onlick com o método Click da _Screen
BINDEVENT(m.ObjRecebido.Janela.painelfundo.page1.obj1,"Rightclick",oManipulador,"OnDClick")
*-- Manipulador - Classe que manipulará o evento
DEFINE CLASS Manipulador AS Custom
PROCEDURE OnDClick
MESSAGEBOX("Você clicou no RightClick")
ENDPROC
ENDDEFINE
The rightClick work perfectly.
Could someone give me help with my code.
Many Thanks
Luis Santos
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only