ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 ImageEnMView dose not sort by filename
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

Eric

18 Posts

Posted - Jul 23 2012 :  20:59:05  Show Profile  Reply
Hi,
ImageEnMView1.FillFromDirectory(DirectoryListBox1.Directory,- 1,false,'iev');

Sometimes it dose not sort by filename when I loads Images from
SD cards.

fab

1310 Posts

Posted - Jul 23 2012 :  23:00:45  Show Profile  Reply
Hi,
FillFromDirectory does Not sort by filename. You should use TImageEnMView.Sort method in this way:

function sortByFilename(Item1, Item2: integer):integer;
begin
  result := CompareStr( Form1.ImageEnMView1.ImageFileName[Item1], Form1.ImageEnMView1.ImageFileName[Item2] );
end;

procedure TForm1.Button63Click(Sender: TObject);
begin
  ImageEnMView1.Sort(@sortByFilename);
end;


Starting from next minor version will be possible to do just:

ImageEnMView1.Sort( iesbFilename );

Go to Top of Page

masrnet2006

Saudi Arabia
59 Posts

Posted - May 12 2016 :  03:34:41  Show Profile  Reply
//ImageEnMView.Sort
if B then
begin
//Ascending
ImageEnMView.Sort(iesbFilename,true,false );
B:=false;
end
else
begin
//CaseSensitive

ImageEnMView.Sort(iesbFilename,false,true );
B:=true;
end;
Go to Top of Page

xequte

39053 Posts

Posted - May 14 2016 :  00:05:38  Show Profile  Reply
Sorry, are you having trouble?

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: