Page 1 of 1

xBrowse - Desactivar Búsqueda incremental - SOLUCIONADO

PostPosted: Sat Sep 07, 2013 12:00 pm
by rolando
Buen día,

Pues, eso del asunto. ¿Se puede desactivar la búsqueda incremental en el xBrowse?.

Gracias.

Rolando :D

Re: xBrowse - Desactivar Búsqueda incremental

PostPosted: Sat Sep 07, 2013 12:10 pm
by nageswaragunupudi
Set oBrw:bSeek := nil

Re: xBrowse - Desactivar Búsqueda incremental

PostPosted: Sat Sep 07, 2013 1:48 pm
by rolando
Gracias por responder. Funciona OK.

Tenía un problema usando DBF con la clase TDataBase. Al hacer un APPEND BLANK, pongo el índice en "0" y envío el xbrowse al final para poder editar el registro agregado.

El problema se presenta luego de agregar el registro porque queda sin índice activo y da error.

Lo que hice fue modificar algo al final del METHOD KeyChar de la CLASS TXBrowse

Ej.

Code: Select all  Expand view
METHOD KeyChar( nKey, nFlags ) CLASS TXBrowse

.....


 else
   If nKey == VK_BACK .and. !Empty( ::cSeek )
      ::Seek( Left( ::cSeek, Len( ::cSeek ) -1 ) )
     elseIf nKey > 31
//   ::Seek( ::cSeek + cKey )
      try                               //
        ::Seek( ::cSeek + cKey )        //  reforma by rolo 07092013
      catch                             //  si no hay orden (orden 0 en oDbf)
      end                               // no da error al querer buscar
     Endif
   Endif
   endcase

return 0


Con esto evito que de error al no tener índice activo.

Saludos.

Rolando :D

Re: xBrowse - Desactivar Búsqueda incremental

PostPosted: Sat Sep 07, 2013 3:30 pm
by nageswaragunupudi
1. After APPEND BLANK you do not have to change the index
2. Anyway what is the version of FWH you are using?

Re: xBrowse - Desactivar Búsqueda incremental

PostPosted: Sat Sep 07, 2013 10:10 pm
by rolando
Hola,

He solucionado el problema corrigiendo mi código.

Mi manera de programar hace que al agregar un campo, el xBrowse lo muestre al final de la lista como puede verse en imagen que sigue.

Image

A esto sólo puedo implementarlo así:

Code: Select all  Expand view
redefine buttonbmp oBtnAgregar ;
id 4004 OF oDlg ;
action (nOrden:=indexord(),;
        oDbf:SetOrder(0,".\DB\SERVICE.CDX"), oDbf:append() , ;
    oBrw:setfocus() , oBrw:gobottom(),;
    oRichService:settext("") , oRichService:refresh(),;
    oBrw:setfocus(), oBrw:refresh(), oBrw:GoLeftMost(), __keyboard(chr(13)),;
    oDbf:SetOrder(nOrden,".\DB\SERVICE.CDX") );
    update ;
    bitmap "AGREGANDO"
oBtnAgregar:cTooltip:="Agregar Repuesto"
oBtnAgregar:oCursor:=oCur1


Como Dije, cambié mi código y ahora funciona como esperaba. Gracias.

Rolando :D



Translated by Google:

Hello,

I solved the problem by editing my code.

My way of programming makes adding a field, the xBrowse show it to the bottom of the list as shown in image below.

Image

To this I can only implement it like this:

Code: Select all  Expand view
redefine buttonbmp oBtnAgregar ;
id 4004 OF oDlg ;
action (nOrden:=indexord(),;
        oDbf:SetOrder(0,".\DB\SERVICE.CDX"), oDbf:append() , ;
    oBrw:setfocus() , oBrw:gobottom(),;
    oRichService:settext("") , oRichService:refresh(),;
    oBrw:setfocus(), oBrw:refresh(), oBrw:GoLeftMost(), __keyboard(chr(13)),;
    oDbf:SetOrder(nOrden,".\DB\SERVICE.CDX") );
    update ;
    bitmap "AGREGANDO"
oBtnAgregar:cTooltip:="Agregar Repuesto"
oBtnAgregar:oCursor:=oCur1


As I said, I changed my code and now works as expected. Thank you.

Rolando :D