Moderators Melba23 Posted December 9, 2024 Author Moderators Posted December 9, 2024 ValentinM, Spendid news! I will release a new version soon. 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
Moderators Melba23 Posted December 9, 2024 Author Moderators Posted December 9, 2024 ValentinM, Spendid news! I will release a new version soon. 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
Moderators Melba23 Posted December 11, 2024 Author Moderators Posted December 11, 2024 [New VERSION] - 11 Dec 24 Added: New function _GUIListViewEx_EditProcessActive which returns the handle of the ListView concerned if an element is being edited. Usage scenario: prevent HotKeys from working when editing is underway. Fixed: A couple of bugs with columns: added columns were automatically sortable; dragging columns meant editing pop-up could appear in wrong place. Thanks to ValentinM for the reports. New UDF in the first post. M23 ioa747, robertocm and ValentinM 2 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
ValentinM Posted December 24, 2024 Posted December 24, 2024 (edited) Hello Melba, Today I was doing the final tests of my application, and I encountered a case I did not expect to fail. I have a function that deletes columns, using your _GUIListViewEx_DeleteColSpec() function. Unfortunately, when I try to delete the last column of the Listview, I get this error : Spoiler I've been able to fix this on my side, just by doing "if columns count is = 1 then abort", and it is not currently a problem in my app. Anyway, I think it deserves a fix in the future version. Are you able to reproduce the issue ? I wish you a Merry Christmas, take care ! Edited December 30, 2024 by ValentinM May the force be with you. Open AutoIt Documentation within VS Code
ermar Posted Friday at 10:54 AM Posted Friday at 10:54 AM Hi everyone, Thanks to Melba for this really powerful UDF. Do you have a simple example of a listview using this UDF with 3 columns that can be modified on column 2 and 3 only and in Event mode (Opt("GUIOnEventMode", 1)) with a WM_Notify event handling at the same time ? I'm tearing my hair out trying to integrate an example into my main script where several listviews coexist in several tabs. I'd like to start on a good basis. There are subtleties that must escape me, my English is not very good. Thank you for your help.
Moderators Melba23 Posted Friday at 05:16 PM Author Moderators Posted Friday at 05:16 PM ermar, Certainly - how about this: expandcollapse popup#include <GuiConstantsEx.au3> #include <WindowsConstants.au3> #include "GUIListViewEx.au3" Opt("GUIOnEventMode", 1) ; Create GUI $hGUI = GUICreate("LVEx Example", 320, 320) ; Create ListView $cListView = GUICtrlCreateListView("Tom|Dick|Harry", 10, 10, 300, 300, $LVS_SHOWSELALWAYS) _GUICtrlListView_SetExtendedListViewStyle($cListView, $LVS_EX_FULLROWSELECT) _GUICtrlListView_SetColumnWidth($cListView, 0, 93) _GUICtrlListView_SetColumnWidth($cListView, 1, 93) _GUICtrlListView_SetColumnWidth($cListView, 2, 93) ; Set font GUICtrlSetFont($cListView, 12, Default, Default, "Courier New") ; Note edit control will use same font ; Create array and fill listview Global $aLV_List[20] For $i = 0 To UBound($aLV_List) - 1 If Mod($i, 5) Then $aLV_List[$i] = "Tom " & $i & "|Dick " & $i & "|Harry " & $i Else $aLV_List[$i] = "Tom " & $i & "||Harry " & $i EndIf GUICtrlCreateListViewItem($aLV_List[$i], $cListView) Next ; Initiate LVEx $iLV_Left_Index = _GUIListViewEx_Init($cListView, $aLV_List) ; Column 1 & 2 editable - simple text _GUIListViewEx_SetEditStatus($iLV_Left_Index, "1;2") ; Register for sorting, dragging and editing - but do NOT register WM_Notify _GUIListViewEx_MsgRegister(Default) ; Now register the user WM_NOTIFY handler GUIRegisterMsg(0x004E, "_User_WM_NOTIFY_Handler") GUISetState() GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit_Ex") While 1 Sleep(10) $vRet = _GUIListViewEx_EventMonitor(0) If @error Then MsgBox($MB_SYSTEMMODAL, "Error", "Event error: " & @error) EndIf Switch @extended Case 1 If $vRet = "" Then MsgBox($MB_SYSTEMMODAL, "Edit", "Edit aborted" & @CRLF) Else _ArrayDisplay($vRet, "ListView " & _GUIListViewEx_GetActive() & " content edited", Default, 8) EndIf EndSwitch WEnd Func _Exit_Ex() Exit EndFunc Func _User_WM_NOTIFY_Handler($hWnd, $iMsg, $wParam, $lParam) ; Do whatever the user handler is supposed to do here ; Must be LAST line of the handler Return(_GUIListViewEx_WM_NOTIFY_Handler($hWnd, $iMsg, $wParam, $lParam)) EndFunc Please ask if you have any questions. M23 pixelsearch and robertocm 2 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
ermar Posted Saturday at 02:56 PM Posted Saturday at 02:56 PM Hello Melba, thank you very much for this example. It helps me move forward with correcting my script and understanding the methodology. I will probably have more questions. I am progressing slowly but surely :-). Thank you again. Ermar
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