xBrowse Multiselect - Selectall

xBrowse Multiselect - Selectall

Postby Marc Vanzegbroeck » Tue Apr 12, 2016 5:53 pm

Hi,

I have a multiselect xbrowse of an array, and want to select all items.
I have try oBrw:SelectAll(), but it only works if I allready selected at least 2 items.
Is there an other way to select all items.

I use FWH64 16.03
Regards,
Marc

FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Re: xBrowse Multiselect - Selectall

Postby nageswaragunupudi » Tue Apr 12, 2016 9:02 pm

For this browse please set
oBrw:nMarqueeStyle := MARQSTYLE_HIGHLROWMS
Regards

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

Re: xBrowse Multiselect - Selectall

Postby Marc Vanzegbroeck » Wed Apr 13, 2016 5:39 am

Thank you, now it's working :D

Another question about selecting rows. Is there a posibility to select records according to a condition.
I want for example select all raws where column 1 is holding the text '.CSV', after pressing a button.
Regards,
Marc

FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Re: xBrowse Multiselect - Selectall

Postby nageswaragunupudi » Wed Apr 13, 2016 7:43 am

Assuming array browse, please try this:
Code: Select all  Expand view

oBrw:aSelected := {}
AEval( oBrw:aArrayData, { |a,i| If( Upper( cFileExt( Trim( a[ 1 ] ) ) ) == "CSV", AAdd( oBrw:aSelected, i ), nil ) }
oBrw:Refresh()
 
Regards

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

Re: xBrowse Multiselect - Selectall

Postby Marc Vanzegbroeck » Wed Apr 13, 2016 9:56 am

Thank you,

It's working fine.
I want to expand the possibility to deselect all files of one type.
Can I just set the value of the aSelected array to 0 for those records, or should I create a new one?
Regards,
Marc

FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Re: xBrowse Multiselect - Selectall

Postby Marc Vanzegbroeck » Wed Apr 13, 2016 1:00 pm

Marc Vanzegbroeck wrote:Thank you,

It's working fine.
I want to expand the possibility to deselect all files of one type.
Can I just set the value of the aSelected array to 0 for those records, or should I create a new one?


I deleted the record in the oBrw:aSelected array, and now it's working also for deselecting types.

I have another question. In the dialog, I show how many items are selected by showing len(oBrw:aSelected).
For the selections by my buttons, it's working fine.
But if i select by clicking the browse, it's not working.
I added the ON CLICK command by the xbrowse, and did an update uw the say. But it always show the previous amount of selected items.
Regards,
Marc

FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Re: xBrowse Multiselect - Selectall

Postby Marc Vanzegbroeck » Thu Apr 14, 2016 10:56 am

Mr Roa,

Do you know how I can show the number of selected items.
Now it shows the previous selected items.
Regards,
Marc

FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Re: xBrowse Multiselect - Selectall

Postby nageswaragunupudi » Thu Apr 14, 2016 12:25 pm

Please try
oBrw:bOnRefresh := { || oSay:Refresh() }

where oSay is

@ r,c SAY oSay PROMPT Len( oBrw:aSelected ) SIZE ............. OF oDlg
Regards

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

Re: xBrowse Multiselect - Selectall

Postby Marc Vanzegbroeck » Thu Apr 14, 2016 3:51 pm

nageswaragunupudi wrote:Please try
oBrw:bOnRefresh := { || oSay:Refresh() }

where oSay is

@ r,c SAY oSay PROMPT Len( oBrw:aSelected ) SIZE ............. OF oDlg


Thank you, its working fine.
Regards,
Marc

FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 68 guests