Jump to content

Recommended Posts

  • Moderators
Posted

ValentinM,

Spendid news! I will release a new version soon.

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

 

  • Moderators
Posted

ValentinM,

Spendid news! I will release a new version soon.

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

 

  • Melba23 changed the title to GUIListViewEx - New Version 11Dec 24
  • Moderators
Posted

[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

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

 

  • 2 weeks later...
Posted (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

image.png.7c9b5631dfa554ee5eb216b38a9a149d.png

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

May the force be with you.

Open AutoIt Documentation within VS Code

  • 6 months later...
  • 1 month later...
Posted

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
Posted

ermar,

Certainly - how about this:

#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

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

 

Posted

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

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...