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
 TImageEnFolderMView.IncludeSubFolders

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
Sybren Posted - Nov 27 2019 : 16:17:31
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
3   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Nov 29 2019 : 22:51:04
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/TIEFolderWatch.html

Nigel
Xequte Software
www.imageen.com
Sybren Posted - Nov 29 2019 : 14:59:45
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
xequte Posted - Nov 28 2019 : 22:04:36
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