FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour xBrowse - Desactivar Búsqueda incremental - SOLUCIONADO
Posts: 593
Joined: Sat May 12, 2007 11:47 AM

xBrowse - Desactivar Búsqueda incremental - SOLUCIONADO

Posted: Sat Sep 07, 2013 12:00 PM

Buen día,

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

Gracias.

Rolando :D

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM

Re: xBrowse - Desactivar Búsqueda incremental

Posted: Sat Sep 07, 2013 12:10 PM

Set oBrw:bSeek := nil

Regards



G. N. Rao.

Hyderabad, India
Posts: 593
Joined: Sat May 12, 2007 11:47 AM

Re: xBrowse - Desactivar Búsqueda incremental

Posted: Sat Sep 07, 2013 01:48 PM
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 (fw): Select all Collapse
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 :-)
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM

Re: xBrowse - Desactivar Búsqueda incremental

Posted: Sat Sep 07, 2013 03:30 PM
  1. After APPEND BLANK you do not have to change the index
  2. Anyway what is the version of FWH you are using?
Regards



G. N. Rao.

Hyderabad, India
Posts: 593
Joined: Sat May 12, 2007 11:47 AM

Re: xBrowse - Desactivar Búsqueda incremental

Posted: Sat Sep 07, 2013 10:10 PM
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.



A esto sólo puedo implementarlo así:

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



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.



To this I can only implement it like this:

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

Continue the discussion