by Maurizio » Mon May 15, 2006 6:34 am
I solve with a work around :
this is a sample for the wbrowse.prg but it is possible to use in every control :
oBrwArt:bTimer := {|| MsgInfo("Hello") }
//-------------------------------------------------------
//1 - ADD this variable
DATA oTimer
DATA nTimer
DATA bTimer
// ------------------------------------------------------
// 2 Method LButtonDown
METHOD LButtonDown( nRow, nCol, nKeyFlags ) CLASS TWBrowse
local nClickRow, nSkipped
local nColPos := 0, nColInit := ::nColPos - 1
local nAtCol
//----- my_modi
IF ::bTimer != nil
::nTimer := 1
::oTimer := TTimer():New( 1000, ;
{||(::nTimer++,;
IIF( ::nTimer > 1 , ( ::nTimer := 0 ,::oTimer:End() , eval(::bTimer) ), ) )})
::oTimer:Activate()
ENDIF
// -----------------------------------------------------
// 2 Method LButtonUp
METHOD LButtonUp( nRow, nCol, nFlags ) CLASS TWBrowse
//----- my_modi
IF ::bTimer != nil
IF ::nTimer > 0
::oTimer:End()
ENDIF
::nTimer := 0
ENDIF