Page 1 of 1

FiveTouch events

Posted: Sat Apr 15, 2017 6:53 am
by Antonio Linares
As FiveTouch uses Harbour QT library, then you simply do:

oControl:Connect( nEvent, { | uParam | MsgInfo( uParam ) } )

where nEvents is one of these values:
http://doc.qt.io/qt-4.8/qevent.html

Example:

Code: Select all

#include "FiveTouch.ch"

function Main()

   local oDlg, oBtnOk, oBtnCancel

   DEFINE DIALOG oDlg

   oDlg:Connect( 2, { || MsgInfo( "click" ) } )
   
   @ 200, 90 BUTTON oBtnOk PROMPT "Ok" OF oDlg ;
      ACTION MsgInfo( "Ok!" )

   @ 200, 220 BUTTON oBtnCancel PROMPT "Cancel" OF oDlg ;
      ACTION oDlg:End()

   ACTIVATE DIALOG oDlg CENTERED

return nil
 
Image

Image