Search the Community
Showing results for tags 'fileexlorer'.
-
This is a UDF to use a Listview or Treeview as a File/Folder Explorer. You can also fine the TreeListExplorer UDF on Github. It allows to create a system, where a root folder can be set and that synchronizes all attached Tree or Listviews. So it is possible to attach multiple views to one system. Additionally, it is possible to add an Input Control as a View to show the current folder. When pressing {ENTER}, the system opens the path provided by the input. The following functions are available: ; #CURRENT# ===================================================================================================================== ; __TreeListExplorer_StartUp ; __TreeListExplorer_Shutdown ; __TreeListExplorer_CreateSystem ; __TreeListExplorer_DeleteSystem ; __TreeListExplorer_AddView ; __TreeListExplorer_RemoveView ; __TreeListExplorer_OpenPath ; __TreeListExplorer_Reload ; __TreeListExplorer_GetPath ; __TreeListExplorer_GetRoot ; __TreeListExplorer_GetSelected ; __TreeListExplorer_SetRoot ; =============================================================================================================================== When creating a System, a callback function can be provided to be called, when the root folder or the current folder changes. When adding a View, callback functions for single/double click at an item as well as a loading callback can be added. Example view: The Code for the Example to get a quick overview: If you like it, please leave me a comment, also if you have any suggestions to make it better or if you found bugs. I did a complete rework of this UDF (2025/03/02). Now it is easier to use and does not need external UDFs anymore. This also removes a lot of bugs, that were in the old version. It is also possible to freely select if folders and/or files should be visible in any view. Changelog: Version 1.0.0 (Old Version) Version 2.0.0 (New Version after rework) Version 2.1.0 - Rename $sCallbackOnSelect to $sCallbackOnClick - Add an additional callback $sCallbackOnSelectionChange, that is called whenever the Tree-/ListView item selection changes Version 2.2.0 - Improve loading speed for TreeView folders when expanding Version 2.3.0 - Fix some bugs where folders did not correctly expand/collapse when clicking them (when the root folder is not "" => shows all drives) - Fix some documentation - Add a method for reloading (__TreeListExplorer_Reload) the current folder (ListView/TreeView) or all folders (TreeView) - Remove the reload parameter from the __TreeListExplorer_OpenPath method (Replaced with __TreeListExplorer_Reload). - Other small internal changes Version 2.4.0 - Add the possibility to handle file/folder selections better - Files/Folders keep selected when reloading - The currently selected File/Folder can be checked with __TreeListExplorer_GetSelected - File selection is synchronized between all Tree-/Listviews, Folder selection only between ListViews (TreeView folder selection changes the current folder and expands it) - fixed minor issues Version 2.5.0 - Disabled TreeList expand with a single click and changed it to a double click - Selection is now synchronized for all files/folders between all views (Tree-/ListView) - The Selection callback is now moved from __TreeListExplorer_AddView to __TreeListExplorer_CreateSystem and only fires ones per change for the system and not for every view (as it was before) - All callbacks were changed to pass the selected folder and some additional information is now provided (clicked index/item, the loading path,...) - Small performance improvements - Some internal restructuring Version 2.5.1 - Fixed: selection not working for drives Version 2.6.0 - Added support for icons of all file extensions for TreeViews and ListViews. Version 2.7.0 - Input controls are now possible as a view. They show the current folder and when pressing {ENTER} inside, the system tries to open the path show in the input. - Changed the behavior of the treeview when clicking items. They now change the current folder, but are not expanded. This changes the folder in the ListView, when clicking a folder in the TreeView. Version 2.7.1 - Clicking on the Bitmap of a TreeView item is now registered as a click (not just the text like before) - Fixed a missing selection update when clicking on a TreeView item Version 2.7.2 - Add parameter for setting the (file-/folder-)icon size on startup Version 2.8.0 - TreeView selection is now triggering the select event and the $sSelect corresponds to the selected folder/file. NOTE: __TreeViewExplorer_GetSelected will be empty, if the selection is a folder in a treeview - Selection handling was improved, especially the synchronization between TreeView and ListView - Add keyboard navigation to the listview - Fixed a bug, where the icon index was sent as event (GuIGetMsg), when an item was clicked (happens without the udf message handling, so it needed a workaround: suppress the default autoit handler for mouseclicks) Version 2.8.1 - Fixed a bug, where the select callback was sometimes not send correctly Version 2.9.0 - Fixed bug for TreeViews, where folders were shown as expandable, when having only files but no folders, even if showing files was turned of - rework how treeviews are filled/updated/expanded (folders that are expanded will stay expanded on reload) - add the possibility to set a depth limit for the treeview (Example: Drive selection with $sRoot="" and $iMaxDepth=0) - Fixed bug for Arrow selection in the ListView to not trigger a click event anymore - When the open folder or the selection changed, the TreeView checks, if it still exists (=> treeview updates, if a folder was deleted) Version 2.9.1 - Workaround for a Bug in the GuiTreeView UDF (until it is fixed), causing random control deletions instead of TreeView item deletions Version 2.9.3 - Fixed custom icon size when extracting icons Version 2.9.4 - Improved display quality for some icons (Thanks WildByDesign for the work on that) - Fixed an issue, where cached file icons for individual files were shown as a folder Version 2.9.5 - Improved display quality for some icons (When resource files are defined in the registry, the one with the size greater or equal to the required icon size will be choosen) Version 2.10.0 - Added the possibility to filter ListViews/TreeViews with a callback function. This callbackfunction is called for every file/folder and only if it returns True, will they be added to the view. - Added the possibility to set $bNavigate for ListViews when adding them. This enables or disables the possibility to navigate through folders with doubleclicks in a ListView (and add/removes the ".." folder at the top, which enables the user to navigate to the parent folder) Special thanks to @WildByDesign for a lot of testing to help improving this UDF. TreeListExplorer.au3 TreeListExplorer-Example.au3
- 65 replies