btnget/fwh 02/2008/xharbour 1.1.0

btnget/fwh 02/2008/xharbour 1.1.0

Postby Wanderson » Mon Mar 24, 2008 5:37 pm

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

Gracias.
Wanderson
 
Posts: 332
Joined: Thu Nov 17, 2005 9:11 pm

Postby karinha » Mon Mar 24, 2008 6:24 pm

Wanderson,

Code: Select all  Expand view  RUN
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 - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7859
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot], wilsongamboa and 65 guests