Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with Bindevent - click not working
Message
De
24/05/2016 19:05:48
Luis Santos
Biglevel-Soluções Informáticas, Lda
Portugal
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Problem with Bindevent - click not working
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Network:
Windows Server 2012
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01636754
Message ID:
01636754
Vues:
91
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform