Closed adrienreboisson closed 4 years ago
Yes, that sounds great. :-)
How to not show the zip files? Sorry, I don't know how to modify the code. @adrienreboisson
I even don't need to show the zip files. It is really annoying.
Virtual Explore shows whatever Windows File Explorer shows. You could disable Windows 10 zip support.
Alternatively you you can implement the OnExpanding event to prevent Zip files from expanding.
Finally you can use the OnEnumFolder event to prevent folders or files showing.
Hi !
I'm using the TVirtualExplorerTreeView component (dropped on the main form) and I experienced a strange situation where the application seemed "frozen" on startup - the app window did not appear with 100% CPU usage.
After some time spent in trying to reproduce the issue I discovered that the problem came from the way the tree handled ZIP files. On the user desktop there was a ZIP file with more than 100000 files, and as
foNonFolder
was assigned to the fileFileObjects
property (I need to allow selection of folders AND files) the component was trying to enumerate all its content to populate the tree. ZIP files are handled this way because Windows pretends this is a special kind of "folder" (SFGAO_FOLDER
) - which is not entirely false.I understand this behavior could be useful for some users, but it has some serious limitations :
According to MSDN :
So it's easy to avoid browsing these files by checking for items having both
SFGAO_STREAM
andSFGAO_FOLDER
attributes set. This can be done by adding this kind of code inTCustomVirtualExplorerTree.ItemHasChildren()
:This works, but a more elegant solution would be to add a custom option into the component, for instance "
toBrowseContainerFiles
" inTreeOptions.VETFolderOptions
, enabled by default. In this case, adding a such code inTCustomVirtualExplorerTree.ItemHasChildren
would fix the problem :Do you think adding a such property to inhibit ZIP files content enumeration would be feasible ? I think that could help other users who don't want this kind of behavior.
Thanks,
Adrien