General information
Category:
Coding, syntax & commands
Title:
Problem with Bindevent - click not working
Environment versions
Network:
Windows Server 2012
Hello comunity
I have create a script that in practice create a button and on click i pretend do something.
My problem is Click don´t work , but button are create correctly.
My code are:
initobjecto("NossoTimer")
PDU_4N40ZH67F.AddObject("myTimer1","myTimer")
PDU_4N40ZH67F.myTimer1.Interval=1
Define Class myTimer As NossoTimer
Procedure Timer
If Wexist ("FTCOMVY")
PDU_4N40ZH67F.RemoveObject("myTimer1")
Local oHandler
*-- Bind the click event to a handler
oHandler = Newobject ("ClickHandler")
FTcomvy.bok2.AddObject ('cbotao1', 'commandbutton')
Bindevent (FTCOMVY.bok2.cbotao1, "Click", oHandler, "Build")
*-- Set the appearance of the button first ...
* Cria um botão
FTcomvy.bok2.cbotao1.caption = "Build"
* O botão fica activo
FTCOMVY.Bok2.cbotao1.Enabled=.T.
*posição
FTCOMVY.Bok2.cbotao1.Top = 5
FTCOMVY.Bok2.cbotao1.Left = 8
FTCOMVY.Bok2.cbotao1.Height = 27
*-- ... then make it visible.
FTCOMVY.Bok2.cbotao1.Visible = .T.
Endif
If(PDU_4N40ZH67F.Visible)
Hide Window "PDU_4N40ZH67F"
Endif
Endproc
Enddefine
*----------------------------------------
Define Class ClickHandler As Session
Procedure build
msg("on mybotao click")
doread("FO","SFO")
Return
Enddefine
Someone have an ideia about why the click don´t work
Best regards
Luis
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