Request Xbrowse Feature

Post Reply
User avatar
Silvio.Falconi
Posts: 7235
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 16 times

Request Xbrowse Feature

Post by Silvio.Falconi »

I wanted to know if it was possible to insert in the command

Code: Select all | Expand

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

Code: Select all | Expand

@ 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
User avatar
Silvio.Falconi
Posts: 7235
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 16 times

Re: Request Xbrowse Feature

Post by Silvio.Falconi »

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
User avatar
Silvio.Falconi
Posts: 7235
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 16 times

Re: Request Xbrowse Feature

Post by Silvio.Falconi »

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
User avatar
Antonio Linares
Site Admin
Posts: 42716
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 93 times
Been thanked: 103 times
Contact:

Re: Request Xbrowse Feature

Post by Antonio Linares »

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
User avatar
Antonio Linares
Site Admin
Posts: 42716
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 93 times
Been thanked: 103 times
Contact:

Re: Request Xbrowse Feature

Post by Antonio Linares »

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
User avatar
Silvio.Falconi
Posts: 7235
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 16 times

Re: Request Xbrowse Feature

Post by Silvio.Falconi »

Antonio Linares wrote: 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.
No Antonio,
this must be set in the combobox used in XBROWSE

Code: Select all | Expand

  @ 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
User avatar
Silvio.Falconi
Posts: 7235
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 16 times

Re: Request Xbrowse Feature

Post by Silvio.Falconi »

Antonio Linares wrote: 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

AS I told you in the previous message

this must be set in the combobox used in XBROWSE

Code: Select all | Expand

  @ 10, 550 COMBOBOX oBrw:oSortCbx VAR oBrw:cSortOrder;
        SIZE 150,400 PIXEL OF oDlg HEIGHTGET 18 STYLE CBS_DROPDOWN
Image


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
Last edited by Silvio.Falconi on Fri Feb 28, 2025 11:21 am, edited 2 times in total.
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
User avatar
Antonio Linares
Site Admin
Posts: 42716
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 93 times
Been thanked: 103 times
Contact:

Re: Request Xbrowse Feature

Post by Antonio Linares »

Dear Silvio,

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

Antonio Linares
www.fivetechsoft.com
User avatar
Silvio.Falconi
Posts: 7235
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 16 times

Re: Request Xbrowse Feature

Post by Silvio.Falconi »

Antonio Linares wrote: Fri Feb 28, 2025 11:18 am 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
User avatar
Silvio.Falconi
Posts: 7235
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 16 times

Re: Request Xbrowse Feature

Post by Silvio.Falconi »

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
User avatar
Silvio.Falconi
Posts: 7235
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 16 times

Re: Request Xbrowse Feature

Post by Silvio.Falconi »

Antonio,

Code: Select all | Expand



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
User avatar
Silvio.Falconi
Posts: 7235
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 16 times

Re: Request Xbrowse Feature

Post by Silvio.Falconi »

Antonio use this sample


Image

Code: Select all | Expand

#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
User avatar
Antonio Linares
Site Admin
Posts: 42716
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 93 times
Been thanked: 103 times
Contact:

Re: Request Xbrowse Feature

Post by Antonio Linares »

FWH\samples\xbincflt.prg
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Silvio.Falconi
Posts: 7235
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 16 times

Re: Request Xbrowse Feature

Post by Silvio.Falconi »

Antonio Linares wrote: Fri Feb 28, 2025 12:24 pm 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
Post Reply