Slipk Posted January 27, 2019 Posted January 27, 2019 Hello everybody, I download the GUIListViewEx.au3 by Melba23 in order to move up or down my items from a listview. Everything it's looking good in script but when I move an item it will crash. Any suggestions? Thank you!
Moderators Melba23 Posted January 27, 2019 Moderators Posted January 27, 2019 Slipk, Please post the code you use (see here how to do it) and an explanation of exactly what you do to get the error- without that how on earth do you expect me to debug? 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
Slipk Posted January 27, 2019 Author Posted January 27, 2019 I understand, the code it's too long to post it here and with too many includes. I will try to fix and do some testing and come back with details.
Slipk Posted January 27, 2019 Author Posted January 27, 2019 I tried absolutely anything I could. Please help me, I can't provide the code as it's too big for that like (100scripts+) with too many includes. Do you know anything that could cause that error? With a simple script that I created it's working. I tried to put before/after @SW_SHOW , that's some part of code below : ;TOP #include <GUIListViewEx.au3> ;UP $Form_Menu_Script = GUICtrlCreateListView("Example|Value 1|Value 2|Value 3|Value 4", 225, 0, $var1, $var2) GUICtrlSendMsg($ListView1, $LVM_SETCOLUMNWIDTH, 0, 250) GUICtrlSendMsg($ListView1, $LVM_SETCOLUMNWIDTH, 1, 150) GUICtrlSendMsg($ListView1, $LVM_SETCOLUMNWIDTH, 2, 150) GUICtrlSendMsg($ListView1, $LVM_SETCOLUMNWIDTH, 3, 150) GUICtrlSendMsg($ListView1, $LVM_SETCOLUMNWIDTH, 4, 150) ;THIS BEFORE @SW_SHOW _GUIListViewEx_Init($ListView1, "", 0, 0, True, 64) _GUIListViewEx_MsgRegister() Another thing I want to precise is that I use dynamic listview items, they don't have variable, also they use right click menu. (;GUICtrlCreateContextMenu) I run as admin, I'm using AutoItSetOption("GuiOnEventMode", 1). Any, at least one suggestion? Thank you for your help.
Slipk Posted January 27, 2019 Author Posted January 27, 2019 PROBLEM SOLVED*** If you create from the GUI the listviewitems you have to reinitialize the UDF Functions. ;example Case $Button1 GUICtrlCreateListViewItem("example", $ListView1) _GUIListViewEx_Close() _GUIListViewEx_Init($ListView1, "", 0, 0, True, 64) _GUIListViewEx_MsgRegister()
Moderators Melba23 Posted January 27, 2019 Moderators Posted January 27, 2019 Slipk, The UDF uses its own internal array to hold and manipulate the ListView data - one way to get an error like that is to add/subtract items from the ListView other than by using the UDF functions, which causes a mismatch between the displayed control and the internal array. Could that be the problem? I am afraid that I cannot offer more than that SWAG* without some working code that demonstrates the error. M23 * SWAG - Scientific Wild Ass Guess, better than a straight WAG, but not by much! 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
Moderators Melba23 Posted January 27, 2019 Moderators Posted January 27, 2019 (edited) Slipk, I see you found the solution - which is explained in the "User Guide" document in the UDF zip: Quote Closure and Reloading: If you delete the ListView, then it is recommended to use _GUIListViewEx_Close to free the memory used by the UDF. If you wish to reload the ListView with new data, you will need to clear the current content using _GUICtrlListView_DeleteAllItems, close it within the UDF using _GUIListViewEx_Close, reload the ListView with the new data and then reinitialise it using _GUIListViewEx_Init. Otherwise the UDF will become confused about the current content and errors will certainly occur. M23 Edit; And my SWAG was correct! Edited January 27, 2019 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
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