Re: [MSEide-MSEgui-talk] Extended Tfilelistview.

2017-10-12 Thread fredvs
> datalist_files.adddirectory('./',fil_ext1,'"*.mp3" "*.wav" "*.ogg"
"*.flac"'); 

Perfect.

> Tip: Ctrl+LeftClick in source editor on "adddirectory" shows the the
> header definition: 

Huh, I use it lot of time but... I have to admit that const amask was well
hidden.
I have to wash my glasses.

Many thanks Martin and, one more time, big wow for mse stringgrid..

Fre;D



--
Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Extended Tfilelistview.

2017-10-10 Thread Martin Schreiber
On Wednesday 11 October 2017 03:08:19 fredvs wrote:
> var
> x : integer;
> datalist_files : tfiledatalist;
> begin
>
> datalist_files := tfiledatalist.create();
>
> // This does not work --->
> // datalist_files.mask := '"*.mp3" "*.wav" "*.ogg" "*.flac"';
>
> datalist_files.adddirectory('/home/fred/mp3/Home cookin',fil_ext1);
>
"
datalist_files.adddirectory('./',fil_ext1,'"*.mp3" "*.wav" "*.ogg" "*.flac"');
"

Tip: Ctrl+LeftClick in source editor on "adddirectory" shows the the header 
definition:

"
   function adddirectory(const directoryname: filenamety;
ainfolevel: fileinfolevelty = fil_name; const amask: filenamearty = 
nil;
const aincludeattrib: fileattributesty = [fa_all];
const aexcludeattrib: fileattributesty = [];
const aoptions: dirstreamoptionsty = [];
const acheckproc: checkfileeventty = nil;
const noexception: boolean = false): boolean; overload;
//amask = nil -> all, true if ok
   function adddirectory(const directoryname: filenamety;
ainfolevel: fileinfolevelty; const amask: filenamety;
const aincludeattrib: fileattributesty = [fa_all];
const aexcludeattrib: fileattributesty = [];
const aoptions: dirstreamoptionsty = [];
const acheckproc: checkfileeventty = nil;
const noexception: boolean = false): boolean; overload;
//amask = '' -> all, true if ok
"

Martin

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Extended Tfilelistview.

2017-10-10 Thread fredvs
Hello Martin.

I have excellent result with this:

var
x : integer;
datalist_files : tfiledatalist;
begin

datalist_files := tfiledatalist.create();

// This does not work --->
// datalist_files.mask := '"*.mp3" "*.wav" "*.ogg" "*.flac"';

datalist_files.adddirectory('/home/fred/mp3/Home cookin',fil_ext1);

datalist_files.options := [flo_sortname,flo_sorttype];

demogrid.rowcount := datalist_files.count;

for x := 0 to datalist_files.count -1 do
begin
demogrid[0][x] := datalist_files.items[x].name;
demogrid[1][x] := fileext(datalist_files.items[x].name);
demogrid[2][x] := inttostr(datalist_files.items[x].extinfo1.size div 1000) +
' kb';
demogrid[3][x] :=
formatdatetime('-MM-DD',datalist_files.items[x].extinfo1.ctime);
end;

end;

See picture:
 

But how to apply a filter/mask ?

Thanks.

Fre;D



--
Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk