Kanashius Posted 12 hours ago Author Posted 12 hours ago @WildByDesign Thank you very much for the praise, I am glad you like it :). And thanks for finding the bug, I fixed it. It was a missing check for $sPath="" in __TreeListExplorer__OpenPath when checking if the path is a file (and then splitting it), that did overwrite the $sSelect to empty. I also checked, if it is possible to select multiple files/folders, which is working with ListViews and not causing any problems. So I added that to the example. (It looks like it is not possible to enable multiselection for TreeViews, if I did not overlook something... Only thing I saw was enabling checkboxes). WildByDesign 1 My Website: Kanashius Webside (Some of my Programs you can find there)
WildByDesign Posted 7 hours ago Posted 7 hours ago @Kanashius You are very welcome. I am happy to help anytime I can. And thank you as well. I was able to drop 2.6.0 right into my current app without any modifications and it worked great, with a minor bug that I will describe below. Also, the addition of retrieving file type icons was a nice added touch as well. The bug can be reproduced in your example app. Using the keyboard to go up and down through all of the drive letters (only drive letters), the selection works 100%. However, if you use only mouse clicks to click through all of the drive letters (only drive letters), it will stop updating the selection and only show the previous selection. It seems to work by mouse click maybe 20% of the time. No issue with keyboard selection though. And this bug only affects the root drive letters.
Kanashius Posted 7 hours ago Author Posted 7 hours ago Well and I did a little change again I liked, that the treeview did not expand, when clicking a folder, but that also means, that the listview is not changed to that folder... I fixed that now. When clicking a folder in the treeview, the folder is opened (becomes the current folder), but not expanded in the treeview. While doing that, I thought, it would be nice to have an Input Control to show the path and to be able to open folders. Well, thats now possible. Simply use __TreeListExplorer_AddView($hSystem, $idInput) and it will be added. When pressing enter in that Input control, the folder is opened by the system. My Website: Kanashius Webside (Some of my Programs you can find there)
Kanashius Posted 6 hours ago Author Posted 6 hours ago (edited) @WildByDesign I think it was working, but you sometimes clicked at the icon... Can happen, if the text is so short. And I think, the Icon should count as a click as well, not just the text, so I adjusted that. Another possibility would be "empty" drives. I do have two empty CD drives and they do not trigger a select. I am not sure, if that is a bug though... They aren't valid folders (which is why they are filtered out)... they cannot be opened. One could argue, if they should be shown at all 🤔. I also fixed a smaller issue I introduced with v2.7.0, where the click at a TreeView item no longer triggered a selection change event. It now does. Edited 6 hours ago by Kanashius My Website: Kanashius Webside (Some of my Programs you can find there)
WildByDesign Posted 6 hours ago Posted 6 hours ago 6 hours ago, Kanashius said: And I think, the Icon should count as a click as well, not just the text, so I adjusted that. Expand I think you are right about this. I was likely clicking on the icon many of those times. I will spend a lot of time testing 2.7.1 tonight and put it through some good testing. I do have a question for you regarding the icon imagelist. The line: Local $hImageList = _GUIImageList_Create(16, 16, 5, 1) The 16 pixels is very dependent on the users' DPI scaling setting. In my app, I get the DPI and store it in a variable and replace the 16 values with the variable and it works really well. But I am wondering, is this something that should (or could) be done within the UDF, or should I just keep doing that part myself?
Kanashius Posted 6 hours ago Author Posted 6 hours ago Regarding the DPI scaling: To my knowledge, in AutoIt the DPI-Scaling is not happening by default, instead it must be enabled specifically ( DPI-Scaling ). Normally the gui is scaled as a whole, I think. That is probably, why I cannot really see a difference at my screens. Additionally, I have no idea, how that would work when moving the gui from one monitor to another (I have different scaling per screen, because 2 are FHD and one is 4k)... All images would have to be rescaled every time and all views reloaded? I think I will not open that can of worms :D. But I added it as a parameter for __TreeListExplorer_StartUp, so you can pass it there, without changing the UDF. That could be useful, when someone is changing the fontsize as well. My Website: Kanashius Webside (Some of my Programs you can find there)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now