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
 TImageEnFolderMView.IncludeSubFolders
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Sybren

28 Posts

Posted - Nov 27 2019 :  16:17:31  Show Profile  Reply
The TImageEnFolderMView.IncludeSubFolders does not automatically refresh the content of its subfolders upon a change when the TImageEnFolderMView.Autorefresh is active. The root folder correctly responds to changes (delete, add files). For some reason it does not actively 'listen' to changes it its subfolders.

I have to set the IncludeSubFolders boolean to FALSE and then back to TRUE to refresh the content of the root and its subfolders of the TImageEnFolderMView.Folders.

Also the DEMO application ('FolderMView.dproj') does not update subfolders (it has a Refresh button to see the changes in the subfolders).

What I am doing wrong or what property should also be set and I forgot? Or is this not possible at all?

Thanks

Sybren

xequte

4888 Posts

Posted - Nov 28 2019 :  22:04:36  Show Profile  Reply
Hi Sybren

At this time, AutoRefresh does not support sub-folders. I will look into it for a coming update and improve the documentation.



Nigel
Xequte Software
www.imageen.com
Go to Top of Page

Sybren

28 Posts

Posted - Nov 29 2019 :  14:59:45  Show Profile  Reply
Hi Nigel,

Thanks for your response. Sorry to hear that for now the AutoRefresh is not working for subfolder. Hopefully you are considering to implement it one day.

For those who are interested, I found a temporary workaround, using TFolderMon (class source code with example project can be downloaded from http://forum.codecall.net), where I refresh the TImageEnFolderMView1 component whenever the instance of TFolderMon is triggered:

procedure HandleFolderChange(ASender: TFolderMon; AFolderItem: TFolderItemInfo);
begin
  TImageEnFolderMView1.LockUpdate;
  TImageEnFolderMView1.IncludeSubFolders := false;
  TImageEnFolderMView1.RefreshFileList;
  TImageEnFolderMView1.IncludeSubFolders := true;
  TImageEnFolderMView1.UnlockUpdate;
end;

It so happens that the folder images are refreshed instantly, and correctly follows the changes in the root- and all subfolders. To avoid multiple triggers, I have disabled the AutoRefresh property of the TImageEnFolderMView1 component.
There are some drawbacks: a short flickering of the thumbnail images, and since I also used checkboxes I need to recheck them again. So far this works to my satisfaction.

In addition, the AFolderItem provides additonal information about the occurrence inside the folder: [faNew, faRemoved, faModified, faRenamedOld, faRenamedNew].

Hopefully users are helped with this workaround.

Sybren
Go to Top of Page

xequte

4888 Posts

Posted - Nov 29 2019 :  22:51:04  Show Profile  Reply
Thanks Sybren,

I'll look at improving the sub-folder support soon.

BTW, you can probably just use TIEFolderWatch that is included with ImageEn:

https://www.imageen.com/help/ImageEn/TIEFolderWatch.html

Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To: