ayuda con edicion en xbrowse

ayuda con edicion en xbrowse

Postby carlos vargas » Sat Aug 12, 2023 8: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: Select all  Expand view

...
    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
Image
aca se perdio loi que tenia ingresado..., aca he notado que con ctrl
Image
Salu2
Carlos Vargas
Desde Managua, Nicaragua (CA)
User avatar
carlos vargas
 
Posts: 1683
Joined: Tue Oct 11, 2005 5:01 pm
Location: Nicaragua

Re: ayuda con edicion en xbrowse

Postby nageswaragunupudi » Sun Aug 13, 2023 4: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
User avatar
nageswaragunupudi
 
Posts: 10248
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: ayuda con edicion en xbrowse

Postby carlos vargas » Sun Aug 13, 2023 4:46 am

Eso, gracias, así me sirve. :-)
Salu2
Carlos Vargas
Desde Managua, Nicaragua (CA)
User avatar
carlos vargas
 
Posts: 1683
Joined: Tue Oct 11, 2005 5:01 pm
Location: Nicaragua

Re: ayuda con edicion en xbrowse

Postby carlos vargas » Mon Aug 14, 2023 9:59 pm

Thank you Rao.
All work ok.
Salu2
Carlos Vargas
Desde Managua, Nicaragua (CA)
User avatar
carlos vargas
 
Posts: 1683
Joined: Tue Oct 11, 2005 5:01 pm
Location: Nicaragua


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 84 guests