xbrowse multisel
xbrowse multisel
Hi,
How the best way to use multisel in xbrowse? I would not like to use a logical field in the dbf to select or unmark the record as there may be other users using the same record.
Thanks in advance!
How the best way to use multisel in xbrowse? I would not like to use a logical field in the dbf to select or unmark the record as there may be other users using the same record.
Thanks in advance!
-
- Posts: 467
- Joined: Sun Oct 30, 2005 6:37 am
- Location: Guangzhou(Canton),China
- Contact:
Re: xbrowse multisel
::nMarqueeStyle := MARQSTYLE_HIGHLROWMS
::select(1)
::seleect(2)
...
::aseleted stores Eval( ::bBookMark) //nrow
::select(0) clear selected rows ,::aselected:={}
Shuming Wang
::select(1)
::seleect(2)
...
::aseleted stores Eval( ::bBookMark) //nrow
::select(0) clear selected rows ,::aselected:={}
Shuming Wang
http://www.xtech2.top
Mobile:(86)13802729058
Email:100200651@qq.com
QQ:100200651
Weixin: qq100200651
Mobile:(86)13802729058
Email:100200651@qq.com
QQ:100200651
Weixin: qq100200651
- Silvio.Falconi
- Posts: 7141
- Joined: Thu Oct 18, 2012 7:17 pm
- Been thanked: 1 time
Re: xbrowse multisel
You must not also use a field on your archivewartiaga wrote: Mon Feb 17, 2025 12:54 am Hi,
How the best way to use multisel in xbrowse? I would not like to use a logical field in the dbf to select or unmark the record as there may be other users using the same record.
Thanks in advance!
Code: Select all | Expand
WITH OBJECT oBrw
:SetMultiSelectCol()

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
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
- Otto
- Posts: 6404
- Joined: Fri Oct 07, 2005 7:07 pm
- Has thanked: 25 times
- Been thanked: 2 times
- Contact:
Re: xbrowse multisel
Respect and congratulations – I like the design.
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
- Silvio.Falconi
- Posts: 7141
- Joined: Thu Oct 18, 2012 7:17 pm
- Been thanked: 1 time
Re: xbrowse multisel
Thanks
Otto, I created my applications with some C5 classes also used by a gentleman on this forum, to avoid being reported for plagiarism I had to change my applications and return to the old tables.
For a sample If I wish not set at init :SetMultiSelectCol() and then I wish select a record from menupopup the procedure can make it but before must insert :SetMultiSelectCol() I ask this to Rao last year and he not answered never for this topic
pratically I asked if I can insert on line the possibility to have :SetMultiSelectCol() into xbrowse
this is one of the many things I never got an answer to
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
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
- karinha
- Posts: 7942
- Joined: Tue Dec 20, 2005 7:36 pm
- Location: São Paulo - Brasil
- Been thanked: 3 times
- Contact:
Re: xbrowse multisel
wartiaga, see if it helps:
Regards, saludos.
Code: Select all | Expand
// C:\FWH\SAMPLES\MULTSEL.PRG by mister Rao.
#include "FiveWin.Ch"
#include "ord.ch"
#include "xbrowse.ch"
#include "hbcompat.ch"
REQUEST DBFCDX
FUNCTION Main()
LOCAL oDlg, oBrw, oFont
XbrNumFormat( 'A', .T. )
USE CUSTOMER NEW ALIAS "CUST" SHARED VIA "DBFCDX"
DEFINE FONT oFont NAME "TAHOMA" SIZE 0, - 14 BOLD
DEFINE DIALOG oDlg SIZE 700, 400 PIXEL FONT oFont
oDlg:lHelpIcon := .F.
@ 10, 10 XBROWSE oBrw SIZE - 10, - 10 PIXEL OF oDlg ;
DATASOURCE "CUST" ;
COLUMNS "FIRST", "CITY", "AGE", "SALARY" ;
CELL LINES NOBORDER
WITH OBJECT oBrw:InsCol( 1 )
:bEditValue := {|| AScan( oBrw:aSelected, oBrw:BookMark ) > 0 }
:SetCheck()
:nHeadBmpNo := {|| If( Len( oBrw:aSelected ) == oBrw:nLen, 1, 2 ) }
END
WITH OBJECT oBrw
:nMarqueeStyle := MARQSTYLE_HIGHLROWMS // multisel does the job
// :nMarqueeStyle := MARQSTYLE_HIGHLROW
:lMultiSelect := .F.
:bClrSelFocus := {|| { CLR_BLACK, CLR_HGRAY } }
:nStretchCol := 3
:aCols[ 1 ]:bClrSelFocus := {|| { CLR_BLACK, CLR_WHITE } }
:bLClicked := {| r, c, f, oBrw | If( oBrw:MouseColPos( c ) == 1, ;
If( ( f := AScan( oBrw:aSelected, oBrw:BookMark ) ) == 0, ;
AAdd( oBrw:aSelected, oBrw:BookMark ), ;
ADel( oBrw:aSelected, f, .T. ) ), NIL ), ;
oBrw:RefreshCurrent() }
:CreateFromCode()
END
ACTIVATE DIALOG oDlg CENTERED
RELEASE FONT oFont
RETURN NIL
// FIN / END
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
- karinha
- Posts: 7942
- Joined: Tue Dec 20, 2005 7:36 pm
- Location: São Paulo - Brasil
- Been thanked: 3 times
- Contact:
Re: xbrowse multisel
ShumingWang wrote: Wed Feb 19, 2025 1:55 am ::nMarqueeStyle := MARQSTYLE_HIGHLROWMS
::select(1)
::seleect(2)
...
::aseleted stores Eval( ::bBookMark) //nrow
::select(0) clear selected rows ,::aselected:={}
Shuming Wang
Thank You!
Re: xbrowse multisel
Thank You for the tip Silvio!Silvio.Falconi wrote: Wed Feb 19, 2025 9:27 amYou must not also use a field on your archivewartiaga wrote: Mon Feb 17, 2025 12:54 am Hi,
How the best way to use multisel in xbrowse? I would not like to use a logical field in the dbf to select or unmark the record as there may be other users using the same record.
Thanks in advance!
Code: Select all | Expand
WITH OBJECT oBrw :SetMultiSelectCol()
![]()
Re: xbrowse multisel
Thank You Karinha, works great!karinha wrote: Wed Feb 19, 2025 2:22 pm wartiaga, see if it helps:
Regards, saludos.Code: Select all | Expand
// C:\FWH\SAMPLES\MULTSEL.PRG by mister Rao. #include "FiveWin.Ch" #include "ord.ch" #include "xbrowse.ch" #include "hbcompat.ch" REQUEST DBFCDX FUNCTION Main() LOCAL oDlg, oBrw, oFont XbrNumFormat( 'A', .T. ) USE CUSTOMER NEW ALIAS "CUST" SHARED VIA "DBFCDX" DEFINE FONT oFont NAME "TAHOMA" SIZE 0, - 14 BOLD DEFINE DIALOG oDlg SIZE 700, 400 PIXEL FONT oFont oDlg:lHelpIcon := .F. @ 10, 10 XBROWSE oBrw SIZE - 10, - 10 PIXEL OF oDlg ; DATASOURCE "CUST" ; COLUMNS "FIRST", "CITY", "AGE", "SALARY" ; CELL LINES NOBORDER WITH OBJECT oBrw:InsCol( 1 ) :bEditValue := {|| AScan( oBrw:aSelected, oBrw:BookMark ) > 0 } :SetCheck() :nHeadBmpNo := {|| If( Len( oBrw:aSelected ) == oBrw:nLen, 1, 2 ) } END WITH OBJECT oBrw :nMarqueeStyle := MARQSTYLE_HIGHLROWMS // multisel does the job // :nMarqueeStyle := MARQSTYLE_HIGHLROW :lMultiSelect := .F. :bClrSelFocus := {|| { CLR_BLACK, CLR_HGRAY } } :nStretchCol := 3 :aCols[ 1 ]:bClrSelFocus := {|| { CLR_BLACK, CLR_WHITE } } :bLClicked := {| r, c, f, oBrw | If( oBrw:MouseColPos( c ) == 1, ; If( ( f := AScan( oBrw:aSelected, oBrw:BookMark ) ) == 0, ; AAdd( oBrw:aSelected, oBrw:BookMark ), ; ADel( oBrw:aSelected, f, .T. ) ), NIL ), ; oBrw:RefreshCurrent() } :CreateFromCode() END ACTIVATE DIALOG oDlg CENTERED RELEASE FONT oFont RETURN NIL // FIN / END