FWH 2103: XBrowse: oSortCbx

Re: FWH 2103: XBrowse: oSortCbx

Postby Marc Venken » Mon Jun 07, 2021 9:42 pm

Silvio.Falconi wrote:I make a test "all together" ( csortbox, search,multisel)


Sylvio, I wanted to make some test on this sample... Is it available ?
Marc Venken
Using: FWH 23.04 with Harbour
User avatar
Marc Venken
 
Posts: 1435
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Re: FWH 2103: XBrowse: oSortCbx

Postby Silvio.Falconi » Mon Jun 07, 2021 9:46 pm

Perhaps I found the solution

WITH OBJECT oBrw
WITH OBJECT oBrw:aCols[ 1]
:cSortOrder:="CLICOGNOME"

END
WITH OBJECT oBrw:aCols[ 2]
:cSortOrder:="CLINOME"

END
WITH OBJECT oBrw:aCols[ 6]
:cSortOrder:="CLIPAESE"

END

but then I cannot click on headers
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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: 7063
Joined: Thu Oct 18, 2012 7:17 pm

Re: FWH 2103: XBrowse: oSortCbx

Postby Silvio.Falconi » Mon Jun 07, 2021 10:03 pm

Marc Venken wrote:
Silvio.Falconi wrote:I make a test "all together" ( csortbox, search,multisel)


Sylvio, I wanted to make some test on this sample... Is it available ?


I create a unique test from

csortbox, search := xbsortcb.prg
multisel := xbmulsel.prg
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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: 7063
Joined: Thu Oct 18, 2012 7:17 pm

Re: FWH 2103: XBrowse: oSortCbx

Postby nageswaragunupudi » Mon Jun 07, 2021 11:44 pm

Set cSortOrder of columns you do not want to sort as "".
Example:

oBrw:aCols[ 3 ]:cSortOrder := ""
oBrw:aCols[ 4 ]:cSortOrder := ""
.....
Regards

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

Re: FWH 2103: XBrowse: oSortCbx

Postby Silvio.Falconi » Tue Jun 08, 2021 9:07 am

nageswaragunupudi wrote:Set cSortOrder of columns you do not want to sort as "".
Example:

oBrw:aCols[ 3 ]:cSortOrder := ""
oBrw:aCols[ 4 ]:cSortOrder := ""
.....


Not run ok
on the combobox run ok then if I click on header 3,4 make the sort
test sample (your modified sample)
Code: Select all  Expand view  RUN

#include "FiveWin.ch"
#include "constant.ch"

 REQUEST DBFCDX


function TestTDatabase()

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

   local aCols    := { ;
                { "FIRST"     , "Cognome",,        120},;
                { "LAST"      , "Nome"   ,,        120 },;
                { "STREET"    , "Indirizzo",,      120 },;
                { "CITY"      , "Località",,       120 },;
                { "STATE"     , "Provincia",,       40 },;
                { "ZIP"       , "Cap", ,            60 }}




   oDbf  := TDatabase():Open( nil, "Customer", "DBFCDX", .t. )
   oDbf:SetOrder( "FIRST" )
   oDbf:GoTop()

   DEFINE DIALOG oDlg SIZE 800,400 PIXEL TRUEPIXEL RESIZABLE

   @ 10, 165 GET oGet VAR cSeek SIZE 280,24 PIXEL OF oDlg

   @ 60,20 XBROWSE oBrw SIZE -20,-20 PIXEL OF oDlg ;
      DATASOURCE oDbf COLUMNS aCols ;
      AUTOSORT ;
      NOBORDER CELL LINES

        oBrw:aCols[ 3 ]:cSortOrder := ""   //no street
        oBrw:aCols[ 6 ]:cSortOrder := ""  // no zip

   WITH OBJECT oBrw


      :RecSelShowRecNo()
      :bClrStd          := { || { CLR_BLACK, If( oBrw:SelectRow(), 0x88EDFB, CLR_WHITE ) } }
      :nRecSelColor     :=   nRgb( 245,244,234)
      :lIncrFilter   := .t.
      :bOnSort       := { |b,oCol| oBrw:Seek( "" ), ;
                             oBrw:cFilterFld := oCol:cExpr, ;
                             oBrw:SetFocus() }
      //
       :SetMultiSelectCol()
       :oSeek := oGet
      :CreateFromCode()
   END



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


   ACTIVATE DIALOG oDlg CENTERED

   oDbf:Close()

   return nil
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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: 7063
Joined: Thu Oct 18, 2012 7:17 pm

Re: FWH 2103: XBrowse: oSortCbx

Postby Silvio.Falconi » Wed Jun 09, 2021 10:31 am

Marc Venken wrote:
Silvio.Falconi wrote:I make a test "all together" ( csortbox, search,multisel)


Sylvio, I wanted to make some test on this sample... Is it available ?


can use the last sample I publish before of this message
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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: 7063
Joined: Thu Oct 18, 2012 7:17 pm

Re: FWH 2103: XBrowse: oSortCbx

Postby Silvio.Falconi » Fri Jun 11, 2021 7:39 am

Nages,
with this procedure I can see the logins of the users in the application.
As you told me to limit the index of some columns I put
cSorBox: = ""
Everything works except that when I press on the third column (time field) it doesn't index me but still displays the indexing arrow, while in the fourth column (process field) it doesn't index me but doesn't display the indexing arrow.

Image

the test

Code: Select all  Expand view  RUN


Function USR200()

 local cHelp
 local oDlgMon,oBar
 local oGrid
 local oDTab,nRec
 local aCols
 local cSeek:=Space(100)
 local oGet
 local oFont,oBold

 HelpSetTopic("Monitor del Sistema")


 oDTab:=TTabAct():New()
 nRec:=oDTab:Lastrec()
 oDTab:SetOrder(1)

  aCols  := { ;
                { "USUARIO"     , "Utente",,      120},;
                { "FECHA"       , "Data"   ,,     120 },;
                { "HORA"        , "Ora",,         120 },;
                { "ACCION"      , "Processo",,    200 }}

   DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14
   DEFINE FONT oBold NAME "TAHOMA" SIZE 0,-14 BOLD


   DEFINE DIALOG oDlgMon SIZE 880,600 ;
      PIXEL TRUEPIXEL RESIZABLE FONT oFont;
      TITLE "Monitor del Sistema"

   @ 10, 165 GET oGet VAR cSeek SIZE 280,24 PIXEL OF oDlgMon

         @ 40,20 XBROWSE oGrid SIZE -20,-20 PIXEL OF oDlgMon ;
      DATASOURCE oDTab COLUMNS aCols ;
      AUTOSORT ;
      NOBORDER CELL LINES

   
       WITH OBJECT oGrid
                :aCols[ 3 ]:cSortOrder := ""
                :aCols[ 4 ]:cSortOrder := ""
   
      :bClrStd          := { || { CLR_BLACK, If( oGrid:SelectRow(), 0x88EDFB, CLR_WHITE ) } }
      :nRecSelColor     :=   nRgb( 245,244,234)
      :lIncrFilter   := .t.
      :bOnSort       := { |b,oCol| oGrid:Seek( "" ), ;
                             oGrid:cFilterFld := oCol:cExpr, ;
                             oGrid:SetFocus() }
      //
      * :SetMultiSelectCol()
       :oSeek := oGet
      :CreateFromCode()
   END

     @ 10, 20 COMBOBOX oGrid:oSortCbx VAR oGrid:cSortOrder  SIZE 100,400 PIXEL OF oDlgMon


   ACTIVATE DIALOG oDlgMon CENTERED

  RETURN (NIL)

 



can you remove the indexing arrow in the third column?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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: 7063
Joined: Thu Oct 18, 2012 7:17 pm

Re: FWH 2103: XBrowse: oSortCbx

Postby nageswaragunupudi » Sun Jun 13, 2021 10:16 pm

Sorry, please try this:
Code: Select all  Expand view  RUN
      :aCols[ 3 ]:cSortOrder := nil
      :aCols[ 4 ]:cSortOrder := nil
 
Regards

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

Re: FWH 2103: XBrowse: oSortCbx

Postby Silvio.Falconi » Mon Jun 14, 2021 7:00 am

nageswaragunupudi wrote:Sorry, please try this:
Code: Select all  Expand view  RUN
      :aCols[ 3 ]:cSortOrder := nil
      :aCols[ 4 ]:cSortOrder := nil
 


run ok thanks
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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: 7063
Joined: Thu Oct 18, 2012 7:17 pm

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 72 guests