FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour bGetFocus en xbrowse existe?
Posts: 1956
Joined: Fri Oct 07, 2005 07:08 PM
bGetFocus en xbrowse existe?
Posted: Thu Oct 21, 2021 07: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/
Posts: 1816
Joined: Wed Oct 26, 2005 02:49 PM
Re: bGetFocus en xbrowse existe?
Posted: Thu Oct 21, 2021 07:43 PM
Creo que este te puede servir

Code (fw): Select all Collapse
    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

[ Turbo Incremental Link64 6.98 Embarcadero 7.70 ] [ FiveWin 25.01 ] [ xHarbour 64 bits) ]
Posts: 1956
Joined: Fri Oct 07, 2005 07:08 PM
Re: bGetFocus en xbrowse existe?
Posted: Thu Oct 21, 2021 07:57 PM
te comparto como lo he resuelto

Code (fw): Select all Collapse
     :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/

Continue the discussion