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
 ImageEnMView1 load from folder based on date range

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
stwizard Posted - May 11 2015 : 13:48:20
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
1   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - May 11 2015 : 15:45:14
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