Martino Posted October 24, 2017 Share Posted October 24, 2017 I have some problems with listview items. in short i create a Gui and a Listview When i doubleclick an item i want to open an edit box where i can enter a new value. When i click ok the gui is recreated. But there seems to be a problem with the recreation of the gui and the Func WM_NOTIFY Here below just a piece of my code but at this time i don't do anything with the newly entered project code. But the list should be visible and when you double click it, the edit box should become visible and after that the gui should become visible again and you should be able again to double click an item so the editbox pops up again. But it goes wrong the second time. Anyone an idea? expandcollapse popup#include <File.au3> #include <Array.au3> #include <GUIConstantsEx.au3> #include <ButtonConstants.au3> #include <GUIListBox.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <GuiListView.au3> #include "_GUIRegisterMsg.au3" ;variables Global $test = "test" GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") CreateGui() Func CreateGui() GUICreate("Test Gui", 1000, 600) Global $idListview = GUICtrlCreateListView("# | COL 1 | COL 2 | COL 3 ", 10, 10, 800, 450) ;,$LVS_SORTDESCENDING) _GUICtrlListView_SetColumnWidth($idListview, 1, 300) _GUICtrlListView_SetColumnWidth($idListview, 2, 250) _GUICtrlListView_SetColumnWidth($idListview, 3, 450) For $n = 1 To 5 GUICtrlCreateListViewItem($n & "|" & $n & "|" & $test & "|" & $n + 2, $idListview) Next GUISetState(@SW_SHOW) ; Loop until the user exits. Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() EndFunc Func WM_NOTIFY($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg, $wParam Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR, $hWndListView, $tInfo $hWndListView = $idListview If Not IsHWnd($idListview) Then $hWndListView = GUICtrlGetHandle($idListview) $tNMHDR = DllStructCreate($tagNMHDR, $lParam) $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom")) $iIDFrom = DllStructGetData($tNMHDR, "IDFrom") $iCode = DllStructGetData($tNMHDR, "Code") Switch $hWndFrom Case $hWndListView Switch $iCode Case $NM_DBLCLK ; Sent by a list-view control when the user double-clicks an item with the left mouse button $tInfo = DllStructCreate($tagNMITEMACTIVATE, $lParam) ShowProjCodeInput() ; No return value Case $NM_RCLICK ; Sent by a list-view control when the user clicks an item with the right mouse button $tInfo = DllStructCreate($tagNMITEMACTIVATE, $lParam) _DebugPrint("$NM_RCLICK" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode & @CRLF & _ "-->Index:" & @TAB & DllStructGetData($tInfo, "Index") & @CRLF & _ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @CRLF & _ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @CRLF & _ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @CRLF & _ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @CRLF & _ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @CRLF & _ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @CRLF & _ "-->lParam:" & @TAB & DllStructGetData($tInfo, "lParam") & @CRLF & _ "-->KeyFlags:" & @TAB & DllStructGetData($tInfo, "KeyFlags")) ;Return 1 ; not to allow the default processing Return 0 ; allow the default processing Case $NM_RDBLCLK ; Sent by a list-view control when the user double-clicks an item with the right mouse button $tInfo = DllStructCreate($tagNMITEMACTIVATE, $lParam) _DebugPrint("$NM_RDBLCLK" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode & @CRLF & _ "-->Index:" & @TAB & DllStructGetData($tInfo, "Index") & @CRLF & _ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @CRLF & _ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @CRLF & _ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @CRLF & _ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @CRLF & _ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @CRLF & _ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @CRLF & _ "-->lParam:" & @TAB & DllStructGetData($tInfo, "lParam") & @CRLF & _ "-->KeyFlags:" & @TAB & DllStructGetData($tInfo, "KeyFlags")) ; No return value EndSwitch EndSwitch ;Return $GUI_RUNDEFMSG EndFunc ;==>WM_NOTIFY Func ShowProjCodeInput() Local $NewProjectCode = InputBox("geef nieuwe projectcode", "Geef de nieuwe projectcode in", "") Local $ConfirmButton = MsgBox(0, "New Proj Code", "New Proj Code: " & $NewProjectCode) $test=$NewProjectCode GUISetState(@SW_HIDE) GUIDelete() CreateGui() EndFunc Exit Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted October 24, 2017 Moderators Share Posted October 24, 2017 Martino, Welcome to the AutoIt forums. My GUIListViewEx UDF (look in my sig for the link) does this for you - and quite a bit more! 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...
Martino Posted October 24, 2017 Author Share Posted October 24, 2017 I saw your UDF before and tried it already but i had the same result. I try to use this one again and paste my code here. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted October 24, 2017 Moderators Share Posted October 24, 2017 Martino, Works fine for me: expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include "GUIListViewEx.au3" Global $test = "test" CreateGui() Func CreateGui() GUICreate("Test Gui", 1000, 600) Global $idListview = GUICtrlCreateListView("# | COL 1 | COL 2 | COL 3 ", 10, 10, 800, 450) ;,$LVS_SORTDESCENDING) _GUICtrlListView_SetColumnWidth($idListview, 1, 300) _GUICtrlListView_SetColumnWidth($idListview, 2, 250) _GUICtrlListView_SetColumnWidth($idListview, 3, 450) For $n = 1 To 5 GUICtrlCreateListViewItem($n & "|" & $n & "|" & $test & "|" & $n + 2, $idListview) Next GUISetState(@SW_SHOW) $aLV_Content = _GUIListViewEx_ReadToArray($idListview) $iLV_Index = _GUIListViewEx_Init($idListview, $aLV_Content) _GUIListViewEx_SetEditStatus($iLV_Index, "2") ; Make the "test" column editable _GUIListViewEx_MsgRegister() ; Loop until the user exits. Do _GUIListViewEx_EventMonitor() ; Allow the UDF to monitor events Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() EndFunc 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...
Martino Posted October 24, 2017 Author Share Posted October 24, 2017 Sorry Melba23, but i can't use it. It's too much info for me at once. I believe your file has very much possibilities but at this time so much info is confusing me. Maybe you can help me step by step. First step. I have already the Listview and i populate the list with For $n = 1 To 5 GUICtrlCreateListViewItem($n & "|" & $n & "|" & $test & "|" & $n + 2, $idListview) Next In my big program i have 3 separate arrays with the vallues, so then it's For $n = 1 To 5 GUICtrlCreateListViewItem($n & "|" & $First_array[$n] & "|" & $Second_Array[$n] & "|" & $Third_Array[$n], $idListview) Next Is this ok or do i first need to store all the information in some kind of 2D-array and then populate the listview with the elements of the 2D-array? Link to comment Share on other sites More sharing options...
Martino Posted October 24, 2017 Author Share Posted October 24, 2017 Melba23, While i was writing my reply you posted the working code. In the mean time i tested your code and it seems to work. I'll try it in my big pprogram. Thank you already for your verry quick response. I'll inform you later Link to comment Share on other sites More sharing options...
Martino Posted October 24, 2017 Author Share Posted October 24, 2017 Yes, Thank you Melba, list is editable. Now i need to do some surgery in my program to continue. Link to comment Share on other sites More sharing options...
kylomas Posted October 24, 2017 Share Posted October 24, 2017 (edited) Martino, F.Y.I. after looking at your code... Please note, do NOT call a blocking function (InputBox and MsgBox) from within a registered function or a function called by a registered function. Also, you are trying to delete and recreate your gui from a function that will return to a registered function. That may also cause problems. kylomas Edited October 24, 2017 by kylomas Skysnake 1 Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill Link to comment Share on other sites More sharing options...
Martino Posted October 24, 2017 Author Share Posted October 24, 2017 I'll keep your info in mind. Thanks. i think i know what you mean. Now i'm strugling with Melba's _GUIListViewEx_ReturnArray to retrieve the items from the listview back to my arrays. Or is there a more simple solution to do this? I now can edit the listview items but when i push a button the items in the list should be checked for format etc. and after that my idea is to display a message if all items are correct and activate another button to export all the list items. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted October 24, 2017 Moderators Share Posted October 24, 2017 Martino, What do you find difficult about retrieving the array using the _ReturnArray function? You just call the function using the handle/ControlID of the ListView. As to checking the content for format etc, you can do this 2 ways: check after each individual edit action as the _EventMonitor function returns an array of the changed elements; or read the content into an array as above and check each element at that time. Let me know which of the two you prefer and I will amend my example above to show how it can be done. M23 Skysnake 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...
Martino Posted October 25, 2017 Author Share Posted October 25, 2017 I'm sorry Melba, but it's probably because i don't have much experience with autoit. It's only my second project. I'm interested in your first option with the _EventMonitor function. For your other question. I was not yet successfulyl on retrieving the data from the listview to an array. Mostly because i don't understand your result. It's working in my program but i don't know why. So first i'm going to read and explore your GUIListViewEx.au3 Concrete i don't understand $aLV_Content = _GUIListViewEx_ReadToArray($idListview) $iLV_Index = _GUIListViewEx_Init($idListview, $aLV_Content) _GUIListViewEx_SetEditStatus($iLV_Index, "2") ; Make the "test" column editable _GUIListViewEx_MsgRegister() I'm going to exlore this first. But any help is welcome of course. I like the response times in this forum. Link to comment Share on other sites More sharing options...
Martino Posted October 25, 2017 Author Share Posted October 25, 2017 OK. i spent a little bit more time on reading the comments in Melba's GUIListViewEx.au3 and i must say it's very complete. So i understand it more now. $aLV_Content = _GUIListViewEx_ReadToArray($idListview) Line above creates an array from the listview with the name $idListview. What i did not knew was the kind of array. But it seems to me that it's a 2D array so $aLV_Content[2][0] gives me the first element of the third line of the Listview. The third line because ListView data starts in [0] element of array (default). $iLV_Index = _GUIListViewEx_Init($idListview, $aLV_Content) The line above is just to enable the UDF functions for the ListView _GUIListViewEx_SetEditStatus($iLV_Index, "2") ; Make the "test" column editable Line above is obvious to make the third column editable _GUIListViewEx_MsgRegister And the line above is to register the Windows messages. So now my listView is editable and i know that my data is in a 2D array so i can continue my work. Thanks again Melba23. Link to comment Share on other sites More sharing options...
Martino Posted October 25, 2017 Author Share Posted October 25, 2017 And with Local $ArraywithEdits = _GUIListViewEx_EventMonitor() you can retrieve the edit items. It's also a 2D array $ArraywithEdits[0][0] is displaying the number of edits (Always 1 in my case $ArraywithEdits[1][0] is displaying the edited item linenumber where result 0 is the first line $ArraywithEdits[1][1] is displaying the edited item column number where result 0 is the first column $ArraywithEdits[1][2] is displaying the old value $ArraywithEdits[1][3] is displaying the newly stored value Great job Melba Link to comment Share on other sites More sharing options...
Martino Posted November 7, 2017 Author Share Posted November 7, 2017 I still have two questions. - Now i can edit a listitem. But when i click a list item and when i click once more somewhere outside the edit box, My GUI is closing. Some little more info. In my code i have Do If @extended = 1 Then ***some more code **** EndIf Until GUIGetMsg() = $GUI_EVENT_CLOSE - Secondly, in my first column there are the names of files (pdf). I would like to open them when i double click on them. Anyone any starting help for one of these? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted November 7, 2017 Moderators Share Posted November 7, 2017 Martino, Please post the entire script as I cannot do much with that snippet alone. 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...
Martino Posted November 7, 2017 Author Share Posted November 7, 2017 expandcollapse popupGlobal $GuiSamenvatting = GUICreate("Gui", 1500, 600) Global $btn_Verplaats = GUICtrlCreateButton(" save", 1250, 10, 150) GUICtrlSetState($btn_Verplaats, $GUI_ENABLE) $idListview = GUICtrlCreateListView("# | FILES | PROJECTCODE | DOCNR | DOCCODE | DOCSOORT | DOELLOCATIE ", 10, 10, 1200, 450) ;,$LVS_SORTDESCENDING) For $n = 1 To $aantgevondenpdfen GUICtrlCreateListViewItem($n & "|" & $arr_scanpdfnaam[$n] & "|" & $arr_gevondenprojectcode[$n] & "|" & $arr_gevondenDocNr[$n] & "|" & $arr_gevondenDocType[$n] & "|" & $arr_gevondenDocTypeNaam[$n] & "|" & $arr_bestandsdestination[$n], $idListview) Next _GUICtrlListView_SetColumnWidth($idListview, 1, 250) _GUICtrlListView_SetColumnWidth($idListview, 2, 100) _GUICtrlListView_SetColumnWidth($idListview, 3, 70) _GUICtrlListView_SetColumnWidth($idListview, 4, 100) _GUICtrlListView_SetColumnWidth($idListview, 5, 150) _GUICtrlListView_SetColumnWidth($idListview, 6, 450) If $AndereExtGevonden = 1 Then GUICtrlCreateLabel("Andere bestandsextensies: " & $andereextensies , 800, 50, 300, 25) EndIf GUISetState(@SW_SHOW) Global $aLV_Content = _GUIListViewEx_ReadToArray($idListview) Global $iLV_Index = _GUIListViewEx_Init($idListview, $aLV_Content,0, 0, True, 32) _GUIListViewEx_SetEditStatus($iLV_Index, "2") ; Project column editable maken _GUIListViewEx_SetEditStatus($iLV_Index, "3") ; doc NR column editable maken _GUIListViewEx_SetEditStatus($iLV_Index, "4") ; Doc type column editable maken _GUIListViewEx_MsgRegister() ; Loop until the user exits. Do Local $ArrayMetItemsListView = _GUIListViewEx_EventMonitor() ; Allow the UDF to monitor events If @extended = 1 Then ;Als er een projectcode aangepast wordt dan Local $ErIsIetsFout = 0 If $ArrayMetItemsListView[1][1] = 2 Then Local $IngevoerdeCode = $ArrayMetItemsListView[1][3] Local $AangepasteLijn = $ArrayMetItemsListView[1][0] + 1 $arr_gevondenprojectcode[$AangepasteLijn]= $IngevoerdeCode GUISetState(@SW_HIDE, $GuiSamenvatting) GUIDelete($GuiSamenvatting) MaakGuiSamenvatting () EndIf EndIf ; If no events Until GUIGetMsg() = $GUI_EVENT_CLOSE Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted November 7, 2017 Moderators Share Posted November 7, 2017 Martino, You need to do some errorchecking of the return from _GUIListViewEx_EventMonitor as shown in the various examples that I add to the UDF download. By clicking outside the edit control you are aborting the edit process and so do not get an array returned - this you get a fatal error when you try to access it, as is shown n the SciTE console. Add some error-checking and it all works: expandcollapse popup#include <GUIConstantsEx.au3> #include <GUIListViewEx.au3> Global $GuiSamenvatting = GUICreate("Gui", 1500, 600) Global $btn_Verplaats = GUICtrlCreateButton(" save", 1250, 10, 150) GUICtrlSetState($btn_Verplaats, $GUI_ENABLE) $idListview = GUICtrlCreateListView("# | FILES | PROJECTCODE | DOCNR | DOCCODE | DOCSOORT | DOELLOCATIE ", 10, 10, 1200, 450) ;,$LVS_SORTDESCENDING) For $n = 1 To 10 ; $aantgevondenpdfen GUICtrlCreateListViewItem($n & "|" & $n & "|" & $n & "|" & $n & "|" & $n & "|" & $n & "|" & $n, $idListview) Next _GUICtrlListView_SetColumnWidth($idListview, 1, 250) _GUICtrlListView_SetColumnWidth($idListview, 2, 100) _GUICtrlListView_SetColumnWidth($idListview, 3, 70) _GUICtrlListView_SetColumnWidth($idListview, 4, 100) _GUICtrlListView_SetColumnWidth($idListview, 5, 150) _GUICtrlListView_SetColumnWidth($idListview, 6, 450) ;If $AndereExtGevonden = 1 Then ;GUICtrlCreateLabel("Andere bestandsextensies: " & $andereextensies , 800, 50, 300, 25) ;EndIf GUISetState(@SW_SHOW) Global $aLV_Content = _GUIListViewEx_ReadToArray($idListview) Global $iLV_Index = _GUIListViewEx_Init($idListview, $aLV_Content, 0, 0, True, 32) _GUIListViewEx_SetEditStatus($iLV_Index, "2") ; Project column editable maken _GUIListViewEx_SetEditStatus($iLV_Index, "3") ; doc NR column editable maken _GUIListViewEx_SetEditStatus($iLV_Index, "4") ; Doc type column editable maken _GUIListViewEx_MsgRegister() ; Loop until the user exits. Do Local $ArrayMetItemsListView = _GUIListViewEx_EventMonitor() ; Allow the UDF to monitor events If Not @error Then ; There was no error detected Switch @extended Case 1 ; Standard edit mode Local $ErIsIetsFout = 0 If $ArrayMetItemsListView <> "" Then ; If edit not aborted If $ArrayMetItemsListView[1][1] = 2 Then Local $IngevoerdeCode = $ArrayMetItemsListView[1][3] Local $AangepasteLijn = $ArrayMetItemsListView[1][0] + 1 ;$arr_gevondenprojectcode[$AangepasteLijn]= $IngevoerdeCode GUISetState(@SW_HIDE, $GuiSamenvatting) GUIDelete($GuiSamenvatting) ;MaakGuiSamenvatting () EndIf EndIf EndSwitch EndIf Until GUIGetMsg() = $GUI_EVENT_CLOSE All clear now? 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...
Martino Posted November 7, 2017 Author Share Posted November 7, 2017 Thank you Melba. Code below has done it. If $ArrayMetItemsListView <> "" Then ; If edit not aborted Maybe you can also help me on my second question. How can i retrieve a double click on the first column and open a pdf ? Link to comment Share on other sites More sharing options...
Martino Posted November 7, 2017 Author Share Posted November 7, 2017 So if ;$ArraywithEdits[1][1] = 1 i i would like to open the pdf and not to show the editbox in the listviiew Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted November 7, 2017 Moderators Share Posted November 7, 2017 (edited) Martino, Use _GUIListViewEx_SetEditStatus with $iMode = 9 and then you can run a user-defined function when the item is double-clicked. Your function should ShellExecute the pdf file selected - you need the function to accept 4 parameters which will allow you to determine which file to open; these parameters are defined in the _GUIListViewEx_SetEditStatus function header. Give it a try and come back if you have problems. M23 Edited November 7, 2017 by Melba23 Added detail 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
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