- 1. If you want to choose between various drives, the UDF now adds them directly to the treeview. In _CFF_Choose having them appear in a separate combo is still an option.
- 2. Following user feedback, the automatic scroll to the first file when selecting files from a tree is now an option in the $iDisplay parameter.
Added: You can now not only define a default drive but also a default folder when choosing between various drives - adding a trailing "\" to the folder path will additionally open the folder. In my testing this sometimes fails for native TreeViews - I imagine because the internal processing that AutoIt needs to carry out delays the expansion process. If the tree has not correctly expanded the UDF automatically reruns the expansion up to 5 times with an increased delay between events until the desired endstate is reached - if there is still a problem then the TreeView is displayed unexpanded. Thanks to Tankbuster for prodding me to get the UDF to do this.
Note: The UDF code uses the new Beta File.au3 include file - if you are still running 220.127.116.11 then look for the 3 lines highlighted by ~~~~~~~~~~~~~~~~~ and amend them as shown. You will also need my RecFileListToArray UDF which is in the zip - you do NOT need this file if you run the Beta.
Previous versions: ChangeLog.txt 8.62KB 116 downloads
I was fed up with using the native FileOpenDialog and FileSelectFolder which appeared anywhere on the screen in seemingly random sizes and often allowed users to select files from other than the path desired. So I decided to write my own version of an Explorer-type treeview and here it is: ChooseFileFolder.
What are the main advantages of this UDF over the normal dialogs?
- Common format for both file and folder selection.
- Ability to size and place the dialog where you want it rather than how Windows last left it.
- Ability to select (and delete) multiple items - even from different folders or drives. You can also select both files and folders from the same tree.
- And there is also a function to allow you to use an existing treeview in your own GUI to display the folder tree - no need to have a dialog at all.
The ChooseFileFolder UDF and examples are now too large to fit within code tags - so here is a zip file with the examples and UDF (and the RecFileListToArray UDF for those not running the Beta): ChooseFileFolder.zip 22.87KB 393 downloads
As usual happy to take feedback and, preferably, plaudits.
Edited by Melba23, 11 December 2013 - 12:18 PM.