xBrowse - Desactivar Búsqueda incremental - SOLUCIONADO

xBrowse - Desactivar Búsqueda incremental - SOLUCIONADO

Postby rolando » 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
Last edited by rolando on Sat Sep 07, 2013 10:11 pm, edited 1 time in total.
User avatar
rolando
 
Posts: 593
Joined: Sat May 12, 2007 11:47 am
Location: San Nicolás - BA - ARGENTINA

Re: xBrowse - Desactivar Búsqueda incremental

Postby nageswaragunupudi » Sat Sep 07, 2013 12:10 pm

Set oBrw:bSeek := nil
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10316
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xBrowse - Desactivar Búsqueda incremental

Postby rolando » Sat Sep 07, 2013 1: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: 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
User avatar
rolando
 
Posts: 593
Joined: Sat May 12, 2007 11:47 am
Location: San Nicolás - BA - ARGENTINA

Re: xBrowse - Desactivar Búsqueda incremental

Postby nageswaragunupudi » Sat Sep 07, 2013 3: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
User avatar
nageswaragunupudi
 
Posts: 10316
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xBrowse - Desactivar Búsqueda incremental

Postby rolando » 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.

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
User avatar
rolando
 
Posts: 593
Joined: Sat May 12, 2007 11:47 am
Location: San Nicolás - BA - ARGENTINA


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 42 guests