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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 ImageEnMView dose not sort by filename

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
Eric Posted - Jul 23 2012 : 20:59:05
Hi,
ImageEnMView1.FillFromDirectory(DirectoryListBox1.Directory,- 1,false,'iev');

Sometimes it dose not sort by filename when I loads Images from
SD cards.
3   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - May 14 2016 : 00:05:38
Sorry, are you having trouble?

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
masrnet2006 Posted - May 12 2016 : 03:34:41
//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;
fab Posted - Jul 23 2012 : 23:00:45
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 );