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
 TImageEnMView Restore Sort Order

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
w2m Posted - Oct 30 2014 : 16:26:42
Why doesn't iesbNone restore the sort order?

function XCompareFilename(i1, i2: Integer): Integer;
{ Custom sort function (by Filename). }
var
  s1, s2: string;
begin
  s1 := ExtractFileName(Form1.Collection1.MIO.Params[i1].FileName);
  s2 := ExtractFileName(Form1.Collection1.MIO.Params[i2].FileName);
  if s1 < s2 then
    Result := -1
  else if s1 > s2 then
    Result := 1
  else
    Result := 0;
end;

if ToggleSort1.Down then
  Form1.Collection1.Sort(XCompareFilename)
else
  Form1.Collection1.Sort(iesbNone);
Form1.Collection1.Update;

You should not have to store the original sort order in a stringlist to do so.

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
4   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Oct 31 2014 : 12:22:25
Hi Bill

Unfortunately TImageEnFolderMView does not have a way of doing that, though nor does Explorer for that matter.


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
w2m Posted - Oct 31 2014 : 05:31:48
So how do you restore the original sort order?

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
xequte Posted - Oct 30 2014 : 17:55:38
Hi Bill

The only sort order that could be restored to would be the order they were retrieved, which would not be useful.

iesbNone is intended as a performance option. i.e. no resources are expended on sorting.

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
xequte Posted - Oct 30 2014 : 17:54:49
Hi Bill

The only sort order that could be restored to would be the order they were retrieved, which would not be useful.

iesbNone is intended as a performance option. i.e. no resources are expended on sorting.

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com