bGetFocus en xbrowse existe?

bGetFocus en xbrowse existe?

Postby goosfancito » Thu Oct 21, 2021 7:24 pm

Hola.
Necesito guardar una copia del valor de una celda en xbrowse antes que sea cambiada.
existe el bGetFocus() en xbrowse?
FWH 21.02
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/
User avatar
goosfancito
 
Posts: 1954
Joined: Fri Oct 07, 2005 7:08 pm

Re: bGetFocus en xbrowse existe?

Postby leandro » Thu Oct 21, 2021 7:43 pm

Creo que este te puede servir

Code: Select all  Expand view  RUN

    oCol:bOnPostEdit   = { | oCol, xVal, nKey | If( nKey == VK_RETURN, calcItemNota(xVal),) }
    oCol:bEditValid   = { | oGet | validaItem(oGet,oBrwItno:nArrayAt) }
    oCol:bEditValue  = {|| if(Len( aDevolu ) > 0 , aDevolu[oBrwItno:nArrayAt]["devolucion"] ,0 ) }
 
Saludos
LEANDRO AREVALO
Bogotá (Colombia)
https://hymlyma.com
https://hymplus.com/
leandroalfonso111@gmail.com
leandroalfonso111@hotmail.com

[ Embarcadero C++ 7.60 for Win32 ] [ FiveWin 23.07 ] [ xHarbour 1.3.0 Intl. (SimpLex) (Build 20230914) ]
User avatar
leandro
 
Posts: 1676
Joined: Wed Oct 26, 2005 2:49 pm
Location: Colombia

Re: bGetFocus en xbrowse existe?

Postby goosfancito » Thu Oct 21, 2021 7:57 pm

te comparto como lo he resuelto

Code: Select all  Expand view  RUN
    :aCols[ 4 ]:bStrData      := { || IIf( ! Empty( ::aPRoductos[ ::oBrw:nArrayAt, 4 ] ), trans( ::aProductos[ ::oBrw:nArrayAt, 4 ], ), ) }
      :aCols[ 4 ]:bEditWhen     := { || ! Empty( ::aProductos[ ::oBrw:nArrayAt, 3 ] ) }
      :aCols[ 4 ]:bOnPostEdit   := { | oCol, xVal, nKey | ;
                                     ::aproductos[ ::oBrw:narrayat, 8 ] := ::aproductos[ ::oBrw:narrayat, 8 ] - ::aproductos[ ::oBrw:narrayat, 4 ], ;
                                     oCol:VALUE := xVal,  ;
                                     ::aproductos[ ::oBrw:narrayat, 8 ] := ::aproductos[ ::oBrw:narrayat, 8 ] + xVal ;}
       :aCols[ 4 ]:bEditValid    := { | oGet | ::valido( oGet, 4 ) }
     
FWH 21.02
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/
User avatar
goosfancito
 
Posts: 1954
Joined: Fri Oct 07, 2005 7:08 pm


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: cmsoft, Google [Bot] and 36 guests