FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Request Xbrowse Feature
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Request Xbrowse Feature
Posted: Wed Jan 22, 2025 08:19 AM
I wanted to know if it was possible to insert in the command
@ 10, 550 COMBOBOX oBrw:oSortCbx VAR oBrw:cSortOrder  SIZE 150,400 PIXEL OF oDlg
the command
@ 10, 70 COMBOBOX nWild ITEMS { "Starting With", "Containing" } ;
      ON CHANGE ( oBrw:lSeekWild := ( nWild == 2 ), ;
                  oBrw:Seek( If( oBrw:lSeekWild, oBrw:cSeek, "" ) ), ;
                  oBrw:SetFocus() ) ;
      SIZE 70,400 PIXEL OF oDlg

in a single combobox i.e. have for example

in addition to the fields in which to search, there is also the possibility of searching with the "Starting With" and "Containing" options


so for example in the case of the customer archive having a combobox like this

FIRST
LAST
separator
"Starting With"
"Containing"


perhaps this possibility could be added with an automatic command of the type

@ 10, 550 COMBOBOX oBrw:oSortCbx VAR oBrw:cSortOrder SIZE 150,400 PIXEL OF oDlg AUTOWILD

and xbrowse will automatically fill in the options "Starting With" and "Containing" in the ITems od Combobox
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Request Xbrowse Feature
Posted: Thu Feb 06, 2025 11:10 AM

any solution Please ?

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Request Xbrowse Feature
Posted: Fri Feb 28, 2025 09:22 AM

can anyone help me?

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Request Xbrowse Feature
Posted: Fri Feb 28, 2025 10:20 AM

Dear Silvio,

We have to respect the standard behavior of the Windows controls.

What you are asking for can be implemented programmatically respecting the standard combobox behavior.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Request Xbrowse Feature
Posted: Fri Feb 28, 2025 10:28 AM

In example:

local aNewItems := { "Starting With", "Containing" }

local aItems := oComboBox:aItems

AEval( aNewItems, { | cItem | AAdd( aItems, cItem ) } )

oComboBox:SetItems( aItems )

oComboBox:bChange = { | oCombo, cItem | ... }

You can apply thins fuctionality in a function

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Request Xbrowse Feature
Posted: Fri Feb 28, 2025 11:10 AM
Antonio Linares wrote: Dear Silvio,

We have to respect the standard behavior of the Windows controls.

What you are asking for can be implemented programmatically respecting the standard combobox behavior.
No Antonio,
this must be set in the combobox used in XBROWSE
  @ 10, 550 COMBOBOX oBrw:oSortCbx VAR oBrw:cSortOrder;
        SIZE 150,400 PIXEL OF oDlg HEIGHTGET 18 STYLE CBS_DROPDOWN
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Request Xbrowse Feature
Posted: Fri Feb 28, 2025 11:13 AM
Antonio Linares wrote: In example:

local aNewItems := { "Starting With", "Containing" }
local aItems := oComboBox:aItems

AEval( aNewItems, { | cItem | AAdd( aItems, cItem ) } )
oComboBox:SetItems( aItems )

oComboBox:bChange = { | oCombo, cItem | ... }

You can apply thins fuctionality in a function

AS I told you in the previous message

this must be set in the combobox used in XBROWSE
  @ 10, 550 COMBOBOX oBrw:oSortCbx VAR oBrw:cSortOrder;
        SIZE 150,400 PIXEL OF oDlg HEIGHTGET 18 STYLE CBS_DROPDOWN



lines 16773- 1676 of Xbrowse Class



In your opinion, if I asked to insert an array into a combobox normal, I wouldn't have known how to do it?

I want to add it to the combobox used with xbrowse, on oBrw:oSortCbx VAR oBrw:cSortOrder

Perhaps you not understood also
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Request Xbrowse Feature
Posted: Fri Feb 28, 2025 11:18 AM
Dear Silvio,

You are right, I did not properly understand you :)
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Request Xbrowse Feature
Posted: Fri Feb 28, 2025 11:23 AM
Antonio Linares wrote: Dear Silvio,

You are right, I did not properly understand you :)
there is an Nages's sample xbsortcb.prg demonstrates using oBrw:oSortCbx
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Request Xbrowse Feature
Posted: Fri Feb 28, 2025 11:36 AM
I understood you not understood

I am forced to use two comboboxes or give up this change because nobody cares, when someone asks then maybe you will change this situation
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Request Xbrowse Feature
Posted: Fri Feb 28, 2025 11:40 AM
Antonio,
function Usage1()

   local oDlg, oBrw
local cSeek:=Space(100)
   local oGet


   USE CUSTOMER NEW VIA "DBFCDX"
   SET ORDER TO TAG FIRST
   GO TOP

   DEFINE DIALOG oDlg SIZE 800,400 PIXEL TRUEPIXEL RESIZABLE
 
 @ 10, 165 GET oGet VAR cSeek SIZE 200,19 PIXEL OF oDlg PICTURE "@!"
 
 
   @ 60,20 XBROWSE oBrw SIZE -20,-20 PIXEL OF oDlg ;
      DATASOURCE ALIAS() ;
      COLUMNS "FIRST","LAST","STREET", "CITY" ;
      HEADERS "NAME","SURNAME","ADDRESS", "TOWN" ;
      AUTOSORT ;
      NOBORDER LINES

   WITH OBJECT oBrw
      :nMarqueeStyle := 2
      :nColorBox    := CLR_HRED
           :lHScroll  := .f.
            :lIncrFilter      := .t.
            :bOnSort          := { |b,oCol| oBrw:Seek( "" ), ;
                                   oBrw:cFilterFld := oCol:cExpr, ;
                                   oBrw:SetFocus() }
            :oSeek := oGet
            :CreateFromCode()
     
   END

   @ 10,20 COMBOBOX oBrw:oSortCbx VAR oBrw:cSortOrder SIZE 100,400 PIXEL OF oDlg



   ACTIVATE DIALOG oDlg CENTERED

   CLOSE DATA

return nil
on @ 10,20 COMBOBOX oBrw:oSortCbx VAR oBrw:cSortOrder SIZE 100,400 PIXEL OF oDlg
I wish add ITEMS { "Starting With", "Containing" }

:oSeek := oGet

the procedure in addition to searching for a text in the xxxx field must also take into account one of the selections "starting" or "containing"
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Request Xbrowse Feature
Posted: Fri Feb 28, 2025 11:57 AM
Antonio use this sample



#include "fivewin.ch"

 REQUEST DBFCDX

function Main()

   local aData

   FERASE( "CUSTOMER.CDX" )
   USE CUSTOMER NEW EXCLUSIVE VIA "DBFCDX"
   aData := FW_DbfToArray( "FIRST,LAST,STREET", , { || RECNO() < 11 } )
   GO TOP
   FW_CdxCreate()
   CLOSE CUSTOMER

   Usage1()


   return nil

function USAGE1()

   local oDlg, oBrw
   local cSeek:=Space(100)
   local oGet

   USE CUSTOMER NEW VIA "DBFCDX"
   SET ORDER TO TAG FIRST
   GO TOP

   DEFINE DIALOG oDlg SIZE 800,400 PIXEL TRUEPIXEL RESIZABLE

  @ 10, 5 GET oGet VAR cSeek SIZE 200,19 PIXEL OF oDlg PICTURE "@!"


   @ 60,20 XBROWSE oBrw SIZE -20,-20 PIXEL OF oDlg ;
      DATASOURCE "CUST" ;
      COLUMNS "FIRST","LAST","STREET", "CITY" ;
      HEADERS "NAME","SURNAME","ADDRESS", "TOWN" ;
      AUTOSORT ;
      NOBORDER LINES

   WITH OBJECT oBrw
      :nMarqueeStyle := 2
      :nColorBox    := CLR_HRED
           :lHScroll  := .f.
            :lIncrFilter      := .t.
            :bOnSort          := { |b,oCol| oBrw:Seek( "" ), ;
                                   oBrw:cFilterFld := oCol:cExpr, ;
                                   oBrw:SetFocus() }
            :oSeek := oGet
            :CreateFromCode()

   END

   @ 10,300 COMBOBOX oBrw:oSortCbx VAR oBrw:cSortOrder SIZE 100,400 PIXEL OF oDlg



   ACTIVATE DIALOG oDlg CENTERED

   CLOSE DATA

return ni
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Request Xbrowse Feature
Posted: Fri Feb 28, 2025 12:24 PM

FWH\samples\xbincflt.prg

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Request Xbrowse Feature
Posted: Fri Feb 28, 2025 12:42 PM
Antonio Linares wrote: FWH\samples\xbincflt.prg
yes but I should use a get control and the oBrw:csortcbx combobox for the search, and then another get control and another combobox for the lseekwild search....

I wanted everything in a single combobox here's what I asked for
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com

Continue the discussion