btnget/fwh 02/2008/xharbour 1.1.0

Post Reply
Wanderson
Posts: 332
Joined: Thu Nov 17, 2005 9:11 pm

btnget/fwh 02/2008/xharbour 1.1.0

Post by Wanderson »

Olá, pulsando f2 não me valida mais o action del btnget, con xharbour 0.99.70 e fwh 10/2007 vai bien.

Gracias.
User avatar
karinha
Posts: 4882
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Post by karinha »

Wanderson,

Code: Select all

METHOD Default() CLASS TBtnGet
   local nRectLen, l3Dlook
   Local nTop, nLeft, nWidth, nHeight

   IF empty( ::bAction )
      Return Nil
   ENDIF

   //MSGINFO( GetWindowLong( ::oWnd:hWnd, GWL_STYLE ))

   IF !lAnd( GetWindowLong( ::hWnd, GWL_STYLE ), ES_MULTILINE )
      //MsgStop("Sorry, but you need to define the ID " + ltrim( str( ::nId ) ) + " as MULTILINE ")
   endif

   if lAnd( GetWindowLong( ::hWnd, GWL_STYLE ) , ES_MULTILINE )
      //MsgInfo("Si soy")
   else
      //MsgInfo("no soy")
   Endif


   nRectLen := ::CalcDims( @nTop, @nLeft, @nWidth, @nHeight )

   ::oBtn := TBtnDown():New( nTop, nLeft, nWidth, nHeight, ;
                 ::cResName,, ::cResName,, {|| Self:SetFocus(), ;
                 eval( ::bAction ) }, Self,"",, .F., .F.,"", ,, , .f. )


   //-> Para nao ter acionamento duplo
   ::bKeyDown := { | nKey | If( nKey == VK_F2, ( Eval( ::bAction ), 0 ),) }

   ::oBtn:bGotFocus  := {|| ::bTmpValid := ::bValid, ::bValid := nil, ;
                            ::oWnd:nLastKey := 0 }
   ::oBtn:bLostFocus := {|| ::bValid := ::bTmpValid }

   GetBtn( ::hWnd, nRectLen )

Return Nil
Veja se voce nao tem uma chamada com o SETKEY() para a tecla F2 em seu
sistema e depois a esta desativando com o NIL.

Abracos.
João Santos - São Paulo - Brasil
Post Reply