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
 Sort order TImageEnMView
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

jenswahl

Germany
74 Posts

Posted - Apr 08 2013 :  04:10:27  Show Profile  Reply
Hello,

I show an image from a TImageEnMView in a TImageEnView using

TImageEnView.IO.LoadFromFile(TIMageEnMView.ImageFileName[idx]).

The next image I get by

Inc(idx);
TImageEnView.IO.LoadFromFile(TIMageEnMView.ImageFileName[idx])

This works fine if the TImageEnMView is sorted by default (Filename). If the TImageEnMView is sorted by date or filesize I NOT get with Inc(idx) the next in TImageEnMView shown image; I get the next in the default sorting order.

How can I get the images in the rigth sequence like the shown appending from the sort order?
I'm using Version 3.1.2.

Jens

xequte

39053 Posts

Posted - Apr 08 2013 :  20:52:49  Show Profile  Reply
Hi Jens

The Filenames[] property will reference the images as they are displayed (current sort order). If you need to display them in their original order you should assign the file list to a TStringList before calling TImageEnMView.sort.



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

jenswahl

Germany
74 Posts

Posted - Apr 08 2013 :  23:11:38  Show Profile  Reply
Hello Nigel,

thank you for your help. But it was a mistake by me:
after showing the image in the TImageEnView I made a fillfromdirectory in the TImageEnMView and so I got the default sorting order.

Jens
Go to Top of Page

Prg

7 Posts

Posted - Apr 10 2013 :  01:45:17  Show Profile  Reply
You need a call TImageEnMView.Sort(YourSortProcedure) after any changes you do in TImageEnMView (add, remove etc.).
Go to Top of Page

jenswahl

Germany
74 Posts

Posted - Apr 12 2013 :  01:46:35  Show Profile  Reply
Thank you Prg. I done it.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: