FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour ayuda con edicion en xbrowse
Posts: 1789
Joined: Tue Oct 11, 2005 05:01 PM
ayuda con edicion en xbrowse
Posted: Sat Aug 12, 2023 08:16 PM
Estimados, nunca he tenido necesidad de editar directamente en una celda en xbrowse, pero ahora es el d铆a, todo bien con este c贸digo, es un browse de un array, el caso es que, si yo estoy editando un valor en una celda, si en ese momento, doy el foco a otra app, por ejemplo, una tabla en excel, de la cual voy a tomar un valor, que necesito en el browse, lo que hasta el momento he ingresado el get se pierde cuando esta celda en edicion pierde el foco momentaneamente, espero haberme explicado correctamente.
Code (fw): Select all Collapse
...
聽 聽 REDEFINE XBROWSE oBrwGara ARRAY aGara;
聽 聽 聽 ID 101 OF PAGE4;
聽 聽 聽 COLUMNS 1, 2, 3, 4, 5;
聽 聽 聽 HEADERS "Descripci贸n del articulo", "Marca", "Serie", "Modelo", "Color";
聽 聽 聽 SIZES 250, 100, 100, 100, 80;
聽 聽 聽 FONT oFontB WHEN nClieNum > 0 FASTEDIT

聽 聽WITH OBJECT oBrwGara
聽 聽 聽 :MyConfig( NIL, NIL, TRUE, NIL, FALSE, TRUE )
聽 聽 聽 :lHScroll 聽 聽 聽:= FALSE
聽 聽 聽 :nHeaderHeight := 36
聽 聽 聽 :nRecSelWidth 聽:= 35 * IIf( Type( "nScale" ) != "U" .and. nScale > 0, nScale, 1 )
聽 聽 聽 :lEdit 聽 聽 聽 聽 := TRUE
聽 聽 聽 :nEditTypes 聽 聽:= EDIT_GET
聽 聽 聽 :nFreeze 聽 聽 聽 := 4
聽 聽 聽 :aCols[ 1 ]:cEditPicture 聽:= "@!"
聽 聽 聽 :aCols[ 2 ]:cEditPicture 聽:= "@!"
聽 聽 聽 :aCols[ 3 ]:cEditPicture 聽:= "@!"
聽 聽 聽 :aCols[ 4 ]:cEditPicture 聽:= "@!"
聽 聽 聽 :aCols[ 5 ]:cEditPicture 聽:= "@!"
聽 聽 聽 :bClrEdits 聽 聽 := {|| { CLR_HRED, CLR_YELLOW } }
聽 聽 聽 :bClrStd 聽 聽 聽 := {|| IIf( oBrwGara:KeyNo() % 2 == 0, { CLR_BLACK, RGB( 198, 255, 198 ) }, { CLR_BLACK, RGB( 232, 255, 232 ) } ) }
聽 聽END

...
aca estoy ingresando un dato (la celda esta en edici贸n), me acuedo que lo tengo en excel, con alt+tab me cambio a excel, copio lo que me interesa poner en la celda y cuando regreso ya lo que he escrito en la celda desapareci贸, porque se me olvido dar enter para confirmar el ingreso..., como puedo evitar esto, y que lo que he escrito este guardado en la celda

aca se perdio loi que tenia ingresado..., aca he notado que con ctrl
Salu2

Carlos Vargas

Desde Managua, Nicaragua (CA)
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: ayuda con edicion en xbrowse
Posted: Sun Aug 13, 2023 04:32 AM

Inline Edit Behavior:

During inline edit of a cell, by default, the changes are saved if the user confirms the changes either by pressing enter or any arrow keys.

During the edit, if the Get loses focus, either by clicking another cell or changing focus to another window/dialog, the Get is closed and the changes are lost by default or saved if oBrw:lAutoSave is set to .t. (This option is not safe)

But the Get does not remain active, as you may want, so that the user can return and continue editing. This is the behavior as of now.

Regards



G. N. Rao.

Hyderabad, India
Posts: 1789
Joined: Tue Oct 11, 2005 05:01 PM
Re: ayuda con edicion en xbrowse
Posted: Sun Aug 13, 2023 04:46 AM
Eso, gracias, as铆 me sirve. :-)
Salu2

Carlos Vargas

Desde Managua, Nicaragua (CA)
Posts: 1789
Joined: Tue Oct 11, 2005 05:01 PM
Re: ayuda con edicion en xbrowse
Posted: Mon Aug 14, 2023 09:59 PM

Thank you Rao.

All work ok.

Salu2

Carlos Vargas

Desde Managua, Nicaragua (CA)

Continue the discussion