nobbitry Posted October 13, 2014 Share Posted October 13, 2014 Hello M23, Nice that you have even thought one step further. I have now tested it in two projects. All parameters seem to work perfectly. nobbitry Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted October 13, 2014 Author Moderators Share Posted October 13, 2014 nobbitry,Delighted to hear it = I will release a new version shortly. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted October 13, 2014 Author Moderators Share Posted October 13, 2014 [NEW VERSION] - 13 Oct 14Added: You can now decide whether to delete or retain the items dragged to another ListView. So that the user can prevent items being dragged back into the ListView if they were not deleted and so creating multiple entries, this change has also forced the change in behaviour below.Changed: The ability to prevent external drag and drop operations has now been split into separate drag/drop parameters. This is script-breaking if you had previously blocked ListViews from external drag/drop operations - but as it only involves adding another value to the $iAdded parameter it is not difficult to fix.Thanks to nobbitry for the suggestion.New UDF in the first post. M23 nobbitry 1 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
nobbitry Posted October 26, 2014 Share Posted October 26, 2014 Hello M23, I have a problem with drag and drop of multiple ListView items. It works fine when I mark a group of items with the mouse. But when I try to select some items with not selected items between them by holding down control and select some items, only the last clicked item is dropped to the new position in the list. Is that currently not possible? Regards nobbitry Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted October 26, 2014 Author Moderators Share Posted October 26, 2014 nobbitry,It was a design decision - if the multiple items are not consecutive then only the contiguous section under the cursor will be dragged. Basically the code got too complicated to do anything else. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
nobbitry Posted October 26, 2014 Share Posted October 26, 2014 Ah, thanks for the info M23 nobbitry Link to comment Share on other sites More sharing options...
nobbitry Posted November 5, 2014 Share Posted November 5, 2014 (edited) Hi M23, I have another question. But I don't know, if it's really a question to your UDF. While drag and drop, when you remain with the cursor outside the ListView you can see that the drag item moves to the listview position where it comes from (sorry for my english..). Can I prevent this effect? Edited November 5, 2014 by nobbitry Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted November 6, 2014 Author Moderators Share Posted November 6, 2014 (edited) nobbitry,If you mean that the small [+] that accompanies the cursor when dragging remains visible when the cursor is outside the ListView then that is a Windows "feature" - nothing to do with AutoIt or my UDF. M23 Edited November 6, 2014 by Melba23 Typo Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
nobbitry Posted November 7, 2014 Share Posted November 7, 2014 Yes, I meant this "feature". Thanks M23 Link to comment Share on other sites More sharing options...
mjolnirmarkiv Posted November 18, 2014 Share Posted November 18, 2014 (edited) Hi Melba, Just to report possible bug -- no multiple items drag and drop anymore (tested within single listview, not sure about external drag and drop), it drag and drops only first item from selection -- possibly was broken during last update. I haven't looked into possible reasons for this yet. Edited November 18, 2014 by mjolnirmarkiv Link to comment Share on other sites More sharing options...
MikahS Posted November 18, 2014 Share Posted November 18, 2014 (edited) I think I noticed something odd, and this could be pertaining to mjolnirmarkiv's post, but I have this script: #include <GUIConstants.au3> #include <GUIListViewEx.au3> Global $hWnd, $msg, $LV_CtrlID, $LV_Ex _GUIListViewEx_MsgRegister() GUI() While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func GUI() $hWnd = GUICreate("Test") $LV_CtrlID = GUICtrlCreateListView("TESTER", 2, 2, 300, 300, $LVS_REPORT) $LV_Ex = _GUIListViewEx_Init($LV_CtrlID) GUICtrlCreateListViewItem("Item1", $LV_CtrlID) GUICtrlCreateListViewItem("Item2", $LV_CtrlID) GUICtrlCreateListViewItem("Item3", $LV_CtrlID) GUICtrlCreateListViewItem("Item4", $LV_CtrlID) GUISetState() EndFunc Which when trying to drag and drop it errors out with this message: "C:\Program Files (x86)\AutoIt3\Include\GUIListViewEx.au3" (1717) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.: $aItemData[$i] = $aGLVEx_SrcArray[$iGLVEx_DraggedIndex + 1][$i] $aItemData[$i] = ^ ERROR It is from this function: _GUIListViewEx_WM_LBUTTONUP_Handler Edited November 18, 2014 by MikahS Snips & Scripts My Snips: graphCPUTemp ~ getENVvarsMy Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4 Feel free to use any of my code for your own use. Forum FAQ Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted November 18, 2014 Author Moderators Share Posted November 18, 2014 mjolnirmarkiv,When I drag multiple items (such as in the 3 scripts posted below) I get all items dropped, Using Example 2 of the UDF package I can also drop multiple items into another ListView. So I am afraid I need a reproducer if I am to work on it. MikahS,Your problem is caused by your not adding the ListView elements by using the UDF after having initiated the ListView. The UDF uses an internal array to track the rows - if you do not tell it that the rows exist it is hardly surprising that it does not know about them. You can fix it in 3 ways. First - add the items using the UDF after having initialised the ListView:#include <GUIConstants.au3> #include <GUIListViewEx.au3> Global $hWnd, $msg, $LV_CtrlID, $LV_Ex _GUIListViewEx_MsgRegister() GUI() While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func GUI() $hWnd = GUICreate("Test") $LV_CtrlID = GUICtrlCreateListView("TESTER", 2, 2, 300, 300, $LVS_REPORT) $LV_Ex = _GUIListViewEx_Init($LV_CtrlID) For $i = 1 To 4 _GUIListViewEx_Insert("Item" & $i) Next GUISetState() EndFuncSecondly by initialising the ListView using an array created when filling it:#include <GUIConstants.au3> #include <GUIListViewEx.au3> Global $hWnd, $msg, $LV_CtrlID, $LV_Ex _GUIListViewEx_MsgRegister() GUI() While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func GUI() Local $aList[4], $sText $hWnd = GUICreate("Test") $LV_CtrlID = GUICtrlCreateListView("TESTER", 2, 2, 300, 300, $LVS_REPORT) For $i = 1 To 4 $sText = "Item" & $i $aList[$i - 1] = $sText GUICtrlCreateListViewItem($sText, $LV_CtrlID) Next $LV_Ex = _GUIListViewEx_Init($LV_CtrlID, $aList) GUISetState() EndFuncThirdly by using the UDF to read the ListView and using the returned array to initialise:#include <GUIConstants.au3> #include <GUIListViewEx.au3> Global $hWnd, $msg, $LV_CtrlID, $LV_Ex _GUIListViewEx_MsgRegister() GUI() While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func GUI() $hWnd = GUICreate("Test") $LV_CtrlID = GUICtrlCreateListView("TESTER", 2, 2, 300, 300, $LVS_REPORT) For $i = 1 To 4 GUICtrlCreateListViewItem("Item" & $i, $LV_CtrlID) Next Local $aList = _GUIListViewEx_ReadToArray($LV_CtrlID) $LV_Ex = _GUIListViewEx_Init($LV_CtrlID, $aList) GUISetState() EndFuncAll clear? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
MikahS Posted November 18, 2014 Share Posted November 18, 2014 I am all over the place today! Thank you Melba23, I very much appreciate the attention to detail and your time. Very grateful, as always. Snips & Scripts My Snips: graphCPUTemp ~ getENVvarsMy Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4 Feel free to use any of my code for your own use. Forum FAQ Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted November 18, 2014 Author Moderators Share Posted November 18, 2014 MikahS,Glad it was your code at fault and not mine - much easier to fix that way! M23 MikahS 1 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
mjolnirmarkiv Posted November 19, 2014 Share Posted November 19, 2014 (edited) mjolnirmarkiv, When I drag multiple items (such as in the 3 scripts posted below) I get all items dropped, Using Example 2 of the UDF package I can also drop multiple items into another ListView. So I am afraid I need a reproducer if I am to work on it. Sure, here's slightly updated Example 2 (just replaced "|" with @TAB as separator char). The problem have smth to do with this, at first glance I fail to see the problem in the code though, but probably, just probably the bug somewhere in the _GUIListViewEx_ReWriteLV. GLVEx_Example_2.au3 Edited November 19, 2014 by mjolnirmarkiv Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted November 19, 2014 Author Moderators Share Posted November 19, 2014 (edited) mjolnirmarkiv,That one was easy to find. It seems that _GUICtrlListView_GetSelectedIndices does not use the defined separator to delimit the selected items but uses "|" regardless. I had replaced ALL instances of "|" with the defined delimiter - changing those instances associated with the function back to "|" seems to have done the trick. Here is a modified Beta UDF:<snip>It works fine for me - but as you seem to have become the official UDF tester would you be kind enough to test it as well please. M23 Edited November 19, 2014 by Melba23 Posted wrong code file! Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
mjolnirmarkiv Posted November 19, 2014 Share Posted November 19, 2014 mjolnirmarkiv, That one was easy to find. It seems that _GUICtrlListView_GetSelectedIndices does not use the defined separator to delimit the selected items but uses "|" regardless. I had replaced ALL instances of "|" with the defined delimiter - changing those instances associated with the function back to "|" seems to have done the trick. Here is a modified Beta UDF:GLVEx_MulDragFix.au3 It works fine for me - but as you seem to have become the official UDF tester would you be kind enough to test it as well please. M23 Thanks! That indeed fixes the problem. Would be nice if UDF will stay "delimeter-neutral", so either change _GUICtrlListView_GetSelectedIndices or retreive array. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted November 19, 2014 Author Moderators Share Posted November 19, 2014 (edited) mjolnirmarkiv, I have just realised that I posted the example and not the UDF - my apologies, I was in a rush to get to the doctor's for my annual blood test. Here is the actual Beta UDF: Quote Would be nice if UDF will stay "delimeter-neutral" As I hope you will find, the UDF is indeed "delimiter-neutral" - it works with your example where you have changed the delimiter and accepts that _GUICtrlListView_GetSelectedIndices uses "|". If you really meant that AutoIt itself should be "delimiter-neutral" and that any returned delimiters should reflect changes made via Opt("GUIDataSeparatorChar") then I suggest you open a feature request. I have no idea how difficult that would be to introduce - but if you never ask... M23 Edited September 27, 2017 by Melba23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
mjolnirmarkiv Posted November 19, 2014 Share Posted November 19, 2014 (edited) mjolnirmarkiv, I have just realised that I posted the example and not the UDF - my apologies, I was in a rush to get to the doctor's for my annual blood test. Here is the actual Beta UDF: Yeah, I've noticed, no problem though, works like it should now. Thanks once again! As I hope you will find, the UDF is indeed "delimiter-neutral" - it works with your example where you have changed the delimiter and accepts that _GUICtrlListView_GetSelectedIndices uses "|". If you really meant that AutoIt itself should be "delimiter-neutral" and that any returned delimiters should reflect changes made via Opt("GUIDataSeparatorChar") then I suggest you open a feature request. I have no idea how difficult that would be to introduce - but if you never ask... No, just UDF. Edited November 19, 2014 by mjolnirmarkiv Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted November 19, 2014 Author Moderators Share Posted November 19, 2014 mjolnirmarkiv,Fine - I will release a new version later today. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Recommended Posts