lSeekBar ONLY IN SOME COLUMNS xBROWSE

lSeekBar ONLY IN SOME COLUMNS xBROWSE

Postby joseluisysturiz » Mon Jun 25, 2018 6:00 am

GOOGLE TRASLATOR...

Greetings, I'm trying the option lSeekBar by xBrowse, and I find it quite useful, but I have some doubts, I express them ...

1- Can you select the columns you want to search for? that is, they are not all by default, if so, how do I do it?

2 - you can persolizar the form of search. that is, it is not sequentially from left to right, but located in the column that you want to search, you can search for a word within a sentence, as it is done in MYSQL and the option [b]% value% [ / b], that is, if I have the phrases: The white horse / Satin white / The white color of the clouds, when searching for the word [b] "white" [/ b], the records are filtered and only mustre These phrases could be with a button to tell the search engine to filter the word or words entered.

3- how I do so that a certain column is the initial and not the column 1 for which the search will be done.

4- It would be nice to CLICK on the head of the column, whether the bar appears and not always being shown.

5- I am combining PopupBrowse with lSeekBar and here is where it would be good (for my case), I could search for a word within the sentence of the record and not activate all fields for search if not only the ones you want, for example CODE / NOMBE-DESCIPTION, but I would not need to activate the BALANCE column, to say the least.

I hope not to be so demanding and the best and all this is raised or even working but I do not know or know how to do it, I hope your help, recommendations and suggestions, greetings ... thanks ...: shock:
Dios no está muerto...

Gracias a mi Dios ante todo!
User avatar
joseluisysturiz
 
Posts: 2064
Joined: Fri Jan 06, 2006 9:28 pm
Location: Guatire - Caracas - Venezuela

Re: lSeekBar ONLY IN SOME COLUMNS xBROWSE

Postby nageswaragunupudi » Wed Jun 27, 2018 2:03 am

1- Can you select the columns you want to search for? that is, they are not all by default, if so, how do I do it?

Incremental seek works on the column that is sorted. If you want to exclude some columns from sorting and incrementa seek, set oCol:cSortOrder := nil for those columns.

2 - you can persolizar the form of search. that is, it is not sequentially from left to right, but located in the column that you want to search, you can search for a word within a sentence, as it is done in MYSQL and the option [b]% value% [ / b], that is, if I have the phrases: The white horse / Satin white / The white color of the clouds, when searching for the word [b] "white" [/ b], the records are filtered and only mustre These phrases could be with a button to tell the search engine to filter the word or words entered.

To search for anywhere inside the field:
Code: Select all  Expand view

oBrw:lSeekWild := .t.
 

To filter for records:
Code: Select all  Expand view

oBrw:lSeekWild := .t. or .f. // as you choose
oBrw:lIncrFilter := .t.
oBrw:cFilterFld := <fieldname>
 

Please try various combination of these settings.

3- how I do so that a certain column is the initial and not the column 1 for which the search will be done.

Set index to that field before starting the xbrowse.
Eg: SET ORDER TO TAG CITY
Incremental seek will start with column CITY.

4- It would be nice to CLICK on the head of the column, whether the bar appears and not always being shown.

I do not understand.

5- I am combining PopupBrowse with lSeekBar and here is where it would be good (for my case), I could search for a word within the sentence of the record and not activate all fields for search if not only the ones you want, for example CODE / NOMBE-DESCIPTION, but I would not need to activate the BALANCE column, to say the least.

You can make the desired settings using 3rd parameter bInit in the function PopupBrowse.
Regards

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

Re: lSeekBar ONLY IN SOME COLUMNS xBROWSE

Postby joseluisysturiz » Wed Jul 04, 2018 5:16 am

mr rao, thanks for your explanations. I am using my browse autosort and use MySql, if I use oBrw: lSeekBar: = .t. I activate the GET in the columns for incremental search, but if I use oBrw: lSeekWild: = .t. o oBrw: lSeekWild: = .t. together with oBrw: lIncrFilter: = .t. I never activate the GET in the columns for incremental search, also probe with the lines below and nothing, does not activate GET for search

oBrw: lIncrFilter: = .t.
oBrw: lSeekWild: = .t.
oBrw: cFilterFld: = "mp_name"

so I define my xBreowse

Code: Select all  Expand view

      @ 0, 25 XBROWSE oBrwMP OF oWndMatPri NOBORDER UPDATE ;
      DATASOURCE oQryMP ;
      LINES CELL AUTOCOLS AUTOSORT ;
      HEADERS "Código", "Nombre o Descripción", "Clasificación", "Ultimo Costo", "Existencia" ;
      COLUMNS "id_mat_prima", "mp_nombre", "cla_nombre", "mp_ultimo_costo", "mp_existencia" ;
      COLSIZES 80, 300, 300, 90, 90 ;
      JUSTIFY 2 ;
      PICTURES , , , "99,999.99999"

      mis_browses2( oBrwMP )

      WITH OBJECT oBrwMP

*:lSeekWild := .t.
*:lIncrFilter := .t.
*:cFilterFld := "mp_nombre"

         :bLDblClick := {|| dat_mat_pri( .f. ) }
         :bKeyDown := {|nKey| IF( nKey == VK_RETURN ,;
            dat_mat_pri( .f. ), ) }
      END

// COLUMNAS ADICIONALES
      WITH OBJECT oBrwMP:InsCol( Len( oBrwMP:aCols ) + 1 )
         :cHeader := "M"
         :nHeadStrAlign := AL_CENTER
         :bEditValue := {|| "" }
         :AddResource( "modi16" )
         :nBtnBmp := 1
         :nEditType  := EDIT_BUTTON
         :bEditBlock := { || dat_mat_pri( .f. ) }
         :cToolTip   := "Pulse Boton para Modificar Registro"
         :nWidth     := 20
      END WITH

      WITH OBJECT oBrwMP:InsCol( Len( oBrwMP:aCols ) + 1 )
         :cHeader := "E"
         :nHeadStrAlign := AL_CENTER
         :bEditValue := {|| "" }
         :AddResource( "elimi16" )
         :nBtnBmp := 1
         :nEditType  := EDIT_BUTTON
         :bEditBlock := { || Alert("Eliminar") }
         :cToolTip   := "Pulse Boton para Eliminar Registro"
         :nWidth     := 20
      END WITH

      oBrwMP:CreateFromCode()
 


Code: Select all  Expand view

PROCEDURE mis_browses2( oBrw, nHead, lFooter, lEvalHead, l2007, lFlecha, lBuscador )

   DEFAULT nHead := 30
   DEFAULT lFooter := .t.
   DEFAULT lEvalHead := .t.
   DEFAULT l2007 := .t. // .f. SE PUEDE PONER FONDO COLOR EN FOOTER, SI NO USA GRADIANTE - 18/06/2017
   DEFAULT lFlecha := .t.
   DEFAULT lBuscador := .t.

*   IF lEvalHead // VALIDA SI SE CENTRAN TODOS LOS head AUTOMATICAMENTE
      AEval( oBrw:aCols, {|o| o:nHeadStrAlign := AL_CENTER } )
*   ENDIF

   WITH OBJECT oBrw
      :nMarqueeStyle     := MARQSTYLE_HIGHLROW// HIGHLWIN7(seleccion multiple) //HIGHLROW(seleccion normal)
      :nColDividerStyle  := LINESTYLE_LIGHTGRAY //BLACK
      :lColDividerComplete := .t.
      :l2007 := l2007
      :nHeaderHeight := nHead
      :lFooter := lFooter
      :lAllowColSwapping := .f.
      :lAllowColHiding   := .f.
      :lRecordSelector := lFlecha // COLOCA SI/NO COL.IZQ.CON FLECHITA
*** COLORES
      :bClrStd = {|| IF( oBrw:KeyNo() % 2 == 0, { CLR_BLACK, RGB(198, 255, 198) } ,; // STANDAR
         { CLR_BLACK, RGB(232, 255, 232) } ) }
      :bClrSelFocus = {|| { CLR_WHITE, RGB(0, 128, 128) } } // CUANDO TIENE EL FOCUS
      :bClrSel = {|| { CLR_WHITE, RGB(51, 102, 204) } } // REGISTRO SELECCIONADO
***
      :lExcelCellWise := .t. // IMPRIMIR DIRECTO A EXCEL - 04/10/2016
***
*:lIncrFilter := lBuscador
*:lSeekWild := lBuscador
*:cFilterFld := "mp_nombre"

*      :lSeekBar := lBuscador // BUSQUEDA INCREMENTAL X TODAS LAS COLUMNAS - 24/06/2018
      :bClrEdits := { || { CLR_BLACK, CLR_YELLOW } }
***      :lGetBar := .f. // POR SI QUIERO QUITAR LA BARRA DE BUSQUEDA EN LAS COLUMNAS - 12/06/2017

   END
   ***
   oBrw:MakeTotals()
   oBrw:RefreshFooters()
   oBrw:GoTop()
   oBrw:REFRESH()

RETURN

 


Greetings...thank you... :shock:
Dios no está muerto...

Gracias a mi Dios ante todo!
User avatar
joseluisysturiz
 
Posts: 2064
Joined: Fri Jan 06, 2006 9:28 pm
Location: Guatire - Caracas - Venezuela

Re: lSeekBar ONLY IN SOME COLUMNS xBROWSE

Postby nageswaragunupudi » Wed Jul 04, 2018 8:36 am

We need to be clear about a few things.

When we set lSeekBar := .t., the boxes we see on the top or NOT GETs. They are only SAYs

Incremental searches work whether lSeekBar is present or not. This functionality of xbrowse is dependent on the keys pressed when xbrowse has focus. If we set lSeekBar to .T., these keystrokes are displayed in the box.

The box is displayed on the top of the column that is sorted. Since, incremental seek works on the sorted column, the keys entered are displayed in the seekbar box just above that column.

But incremental filter has nothing to do with the sorted column. Therefore, lSeekBar is not appropriate for incremental filters.

We may use a normal standard SAY outside the xbrowse:

@ r,c SAY oBrw:oSeek PROMPT oBrw:cSeek SIZE .............. OF oDlg
Regards

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

Re: lSeekBar ONLY IN SOME COLUMNS xBROWSE

Postby joseluisysturiz » Thu Jul 05, 2018 3:43 am

Mr RAO, thank you for your explanation and clarification, the detail is that if I use oBrw: lSeekBar: = .t. only, this shows me below the head of the columns the box to write what I look for and I can see what I write in the SAY, but if I use oBrw: lSeekWild: = .t., then I keep the writing box but I can not see what I write even if he does the filter in the xbrowse ... greetings ... thanks ...

I did it like that:

Code: Select all  Expand view

oBrw:lSeekBar := .t.
oBrw:lIncrFilter := .t.
oBrw:lSeekWild := .t.
oBrw:cFilterFld := "mp_nombre" //  field for the filter / campo para el filtro
oBrw:bClrEdits := { || { CLR_BLACK, CLR_YELLOW } }
 
Dios no está muerto...

Gracias a mi Dios ante todo!
User avatar
joseluisysturiz
 
Posts: 2064
Joined: Fri Jan 06, 2006 9:28 pm
Location: Guatire - Caracas - Venezuela


Return to FiveWin for Harbour/xHarbour

Who is online

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