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
 ImageEnMView1 load from folder based on date range
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

stwizard

USA
39 Posts

Posted - May 11 2015 :  13:48:20  Show Profile  Reply
Greetings all,

I know I can use the following to load all images in a directory to an ImageEnMView component.

ImageEnMView1.FillFromDirectory(DirectoryListBox1.Directory);

Is there any way i can filter what is load based on a date?

I ask because each folder holds 30,000 images and I only want to load images created on one day which may be 50 to 100

Thanks,
Mike

xequte

38514 Posts

Posted - May 11 2015 :  15:45:14  Show Profile  Reply
Hi Mike

You can use the OnImageAdd event to filter added files:

http://www.imageen.com/help/TImageEnMView.OnImageAdd.html

Example:

procedure TfMain.ImageEnMView1ImageAdd(Sender : TObject; idx : integer; const sFilename : string; 
                                       bFolder : boolean; bHiddenFile : boolean; iFileSizeBytes : Int64; 
                                       CreateDate : TDateTime; EditDate : TDateTime; var bAllow : Boolean);
const
  ONE_YEAR = 365;
begin
  // Don't add files more than a year old
  if EditDate < Now - ONE_YEAR then
    bAllow := False;
end;


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: