Jump to content

GuiListViewEx error


Slipk
 Share

Recommended Posts

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! 

look.png

Link to comment
Share on other sites

  • Moderators

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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.

look.png

Link to comment
Share on other sites

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()

 

Link to comment
Share on other sites

  • Moderators

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!

 

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • Moderators

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 by Melba23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...