Jump to content

GUIListViewEx - BugFix Version 6 Apr 24


Melba23
 Share

Recommended Posts

  • Moderators

robertocm,

I can reproduce the problem - looking into it.

M23

Edit: Found it and fixed it - closing ALL ListViews destroyed all the basic preset data along with the activated ListViews.  The next release will work properly - my thanks for finding and reporting the problem.

if you want an immediate fix then replace this function:

Func _GUIListViewEx_Close($iLV_Index = 0)

    ; Check valid index
    If $iLV_Index < 0 Or $iLV_Index > $aGLVEx_Data[0][0] Then Return SetError(1, 0, 0)

    If $iLV_Index = 0 Then
        ; Remove all ListView data and reset count
        ReDim $aGLVEx_Data[1][UBound($aGLVEx_Data, 2)]
        $aGLVEx_Data[0][0] = 0
    Else
        ; Reset all data for ListView
        For $i = 1 To UBound($aGLVEx_Data, 2) - 1
            $aGLVEx_Data[$iLV_Index][$i] = 0
        Next

        ; Cancel active index if set to this ListView
        If $aGLVEx_Data[0][1] = $iLV_Index Then
            $aGLVEx_Data[0][1] = 0
        EndIf

    EndIf

    Return 1

EndFunc   ;==>_GUIListViewEx_Close

 

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

  • Moderators

robertocm,

My pleasure, as always.

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

Dear Melba23,

In the test below i'm trying to load the data without a button: just typing any letter in the input box and press enter key.   (this simulates a text to find in a field database)

Then I click one of the items, and press Backspace hotkey for editing.

But instead of editing, the focus seems to jump back to the input box.

ListView seems to lose the focus when pressing the hotkey first time after loading data in this way.

Many Thanks!

EDITED: amended following Accept Enter Key on input box , but same issue

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

#include "GUIListViewEx.au3"

$hGUI = GUICreate("", 600, 350)
GUICtrlCreateLabel("Type any letter and press Enter to reload ListView:", 2, 5, 300, 30)
Local $KeyW = GUICtrlCreateInput("", 310, 2, 180, 30)
;From ResNullius
;https://www.autoitscript.com/forum/topic/91329-want-to-connect-function-to-enter-key/?do=findComment&comment=657106
$accEnter = GUICtrlCreateDummy()
Global $a_AccelKeys[1][2] = [["{ENTER}", $accEnter]]
GUISetAccelerators($a_AccelKeys)

$cExit = GUICtrlCreateButton("Exit", 300, 300, 110, 30)

;Create empty ListView
$cLV = GUICtrlCreateListView("Zero Column|One Column|Two Column|Three Column", 2, 33, 580, 260, BitOR($LVS_SINGLESEL, $LVS_SHOWSELALWAYS))
For $i = 0 To 3
    _GUICtrlListView_SetColumnWidth($cLV, $i, 140)
Next

;Initiate to get index - empty array passed
$iLV = _GUIListViewEx_Init($cLV, "")
;All columns editable
_GUIListViewEx_SetEditStatus($iLV, "*")

;Create an array for reloading test
Global $aLV[6][4]
For $i = 0 To 5
    $sData = "Item " & $i & "-0"
    $aLV[$i][0] = $sData
    For $j = 1 To 3
        $sData &= "|SubItem " & $i & "-" & $j
        $aLV[$i][$j] = "SubItem " & $i & "-" & $j
    Next
Next

GUISetState()

;Register for editing & dragging
_GUIListViewEx_MsgRegister()

While 1

    $iMsg = GUIGetMsg()
    Switch $iMsg
      Case $GUI_EVENT_CLOSE, $cExit
        Exit
      Case $accEnter
        If _GuiCtrlGetFocus($hGUI) = $KeyW Then
             Reload_ListView()
        Else
             GUISetAccelerators("")
             ControlSend($hGUI, "", _GuiCtrlGetFocus($hGUI), "{ENTER}")
             GUISetAccelerators($a_AccelKeys)
        EndIf
    EndSwitch

    ; Allow edit on double click
    $aRet = _GUIListViewEx_EditOnClick()
 WEnd

Func Reload_ListView()
   ;first clear the current content
   _GUICtrlListView_DeleteAllItems($cLV)
   ;close it within the UDF
   _GUIListViewEx_Close(0)
   ;reload the ListView with data from the array
   _GUICtrlListView_AddArray($cLV, $aLV)
   ;Initiate LVEx - using same filling array
   _GUIListViewEx_Init($cLV, $aLV)
   ;Set all columns editable
   _GUIListViewEx_SetEditStatus($iLV, "*")
   ;GUICtrlSetState($cLV, $GUI_FOCUS)
EndFunc

;From ResNullius (link cited above)
Func _GuiCtrlGetFocus($hGui = "")
    Local $InputID = ControlGetHandle($hGui, "", ControlGetFocus($hGui))
    Return _ControlGetGuiID($InputID)
EndFunc  ;==>_GuiCtrlGetFocus

Func _ControlGetGuiID($hCtrl)
    Local $Result = DllCall("user32.dll", "int", "GetDlgCtrlID", "hwnd", $hCtrl)
    If @error = 0 Then Return $Result[0]
    Return SetError(1, 0, '')
EndFunc  ;==>_ControlGetGuiID

 

Edited by robertocm
Link to comment
Share on other sites

Hi Melba,

 

I think a new issue.
In one of my apps, I populate the ListView from a ARRAY.

That worked fine. But as the array growth it does not look that nice. So I added _GUIListViewEx_BlockReDraw before the populate and set it to False after it.

But suddenly without further change the array got added in reverse order. I add the items with
_GUIListViewEx_Insert($aRetArray[$i])

_GUIListViewEx_SetActive($lvLV1_ExInit)
    Local $aRetArray
    _FileReadToArray($FileImport, $aRetArray)
;~  _GUIListViewEx_BlockReDraw($lvLV1_ExInit,True)
    If IsArray($aRetArray) Then
        For $i = 1 To $aRetArray[0]
            If $aRetArray[$i] <> "" Then _GUIListViewEx_Insert($aRetArray[$i])
        Next
    EndIf
;~  _GUIListViewEx_BlockReDraw($lvLV1_ExInit,False)

This gives me a LV like this:

01
02
03

In case I enable the BlockRedraw the Lv looks like this

03
02
01

Is it maybe that the _GUIListViewEx_Insert needs the redraw to select the new entry?

Could you confirm this behave? Of course I could reverse add the array, but I think that is not the target :-)
 

 

 

 

Link to comment
Share on other sites

  • Moderators

Sorry about the delay in replying - I am overseas dealing with the legal, financial and personal consequences of a family bereavement and my own impending move.

robertocm,

Found the problem - will be fixed in next release. Again my thanks for finding the bug.

Tankbuster,

Just use _GUIListViewEx_InsertSpec and force the insert to the final line - this works fine for me:

_GUIListViewEx_BlockReDraw($iLV,True)
For $i = 0 To UBound($aLV) - 1
    $sData = $aLV[$i][0]
    For $j = 1 To 3
        $sData &= "|SubItem " & $i & "-" & $j
    Next
    _GUIListViewEx_InsertSpec($iLV, -1, $sData)
Next
_GUIListViewEx_BlockReDraw($iLV,False)

Let me know of any more little problems you find - I will try and release a new version once I get home next week.

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

Dear Melba23,

In below test i'm trying to detect the index of highlighted item in the ListView following the steps from A Beginner’s Guide To Melba23’s GUIListViewEx UDF, namely:

  • set the relevant parameter of _GUIListViewEx_MsgRegister to False
  • call the relevant UDF handler function (_GUIListViewEx_WM_NOTIFY_Handler) from within your existing handler

All seems to work except for changing items: i can access to the edit mode, but seems not able to change the value when pressing enter key after editing some text.

Many Thanks,

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

#include "GUIListViewEx.au3"

$hGUI = GUICreate("", 600, 350)
GUICtrlCreateLabel("Type any letter and press Enter to reload ListView:", 2, 5, 300, 30)

Local $KeyW = GUICtrlCreateInput("", 310, 2, 272, 30)

Global $aLV[6][4]
For $i = 0 To 5
    $sData = "Item " & $i & "-0"
    $aLV[$i][0] = $sData
    For $j = 1 To 3
        $sData &= "|SubItem " & $i & "-" & $j
        $aLV[$i][$j] = "SubItem " & $i & "-" & $j
    Next
Next

;Create ListView
$cLV = GUICtrlCreateListView("Zero Column|One Column|Two Column|Three Column", 2, 33, 580, 260, BitOR($LVS_SINGLESEL, $LVS_SHOWSELALWAYS))
For $i = 0 To 3
    _GUICtrlListView_SetColumnWidth($cLV, $i, 140)
Next

;load ListView with data from the array
_GUICtrlListView_AddArray($cLV, $aLV)
;Initiate LVEx - using same filling array
$iLV = _GUIListViewEx_Init($cLV, $aLV)
;All columns editable
_GUIListViewEx_SetEditStatus($iLV, "*")

;From ResNullius
;https://www.autoitscript.com/forum/topic/91329-want-to-connect-function-to-enter-key/?do=findComment&comment=657106
$accEnter = GUICtrlCreateDummy()
Global $a_AccelKeys[1][2] = [["{ENTER}", $accEnter]]
GUISetAccelerators($a_AccelKeys)

$cExit = GUICtrlCreateButton("Exit", 300, 300, 110, 30)

GUISetState()

#cs
;Now trying to detect the index of highlighted item in the ListView
;From 'A Beginner’s Guide To Melba23’s GUIListViewEx UDF':
The UDF registers 4 messages automatically – if you already have message handlers in your script,
do not register them again using the UDF function (set the relevant parameter of _GUIListViewEx_MsgRegister to False)
but call the relevant UDF handler function (_GUIListViewEx_WM_NOTIFY_Handler) from within your existing handler.
;Here an example from Melba23:
https://www.autoitscript.com/forum/topic/182492-guilistviewex-new-version-27-may-16/?do=findComment&comment=1325933
#ce
GUIRegisterMsg($WM_NOTIFY, 'WM_NOTIFY')
;Register for editing & dragging
;prevent the UDF from initially registering the WM_NOTIFY
_GUIListViewEx_MsgRegister(False)

While 1

    $iMsg = GUIGetMsg()
    Switch $iMsg
      Case $GUI_EVENT_CLOSE, $cExit
        Exit
      Case $accEnter
        If _GuiCtrlGetFocus($hGUI) = $KeyW Then
             ;GUICtrlSetData($KeyW, "")
             Reload_ListView()
        Else
             GUISetAccelerators("")
             ControlSend($hGUI, "", _GuiCtrlGetFocus($hGUI), "{ENTER}")
             GUISetAccelerators($a_AccelKeys)
        EndIf
    EndSwitch

    ; Allow edit on double click
    $aRet = _GUIListViewEx_EditOnClick()
 WEnd

;From Zedna, in 'Highlighted item in the ListView?'
;https://www.autoitscript.com/forum/topic/96234-highlighted-item-in-the-listview/?do=findComment&comment=691927
Func WM_NOTIFY($hWnd, $iMsg, $wParam, $lParam)

    ;From Melba23: pass the same parameters to the UDF handler as you received in your WM_NOTIFY handler:
    _GUIListViewEx_WM_NOTIFY_Handler($hWnd, $iMsg, $wParam, $lParam)

    Local $tNMHDR = DllStructCreate($tagNMITEMACTIVATE, $lParam)
    Local $IDFrom = DllStructGetData($tNMHDR, 'IDFrom')
    Local $Index = DllStructGetData($tNMHDR, 'Index')
    Local $Code = DllStructGetData($tNMHDR, 'Code')

    Switch $IDFrom
        Case $cLV
            Switch $Code
            Case $LVN_ITEMCHANGED
                $NMLISTVIEW = DllStructCreate($tagNMLISTVIEW, $lParam)
                ; if state has changed
                If BitAND(DllStructGetData($NMLISTVIEW, "Changed"), $LVIF_STATE) = $LVIF_STATE And _
                    DllStructGetData($NMLISTVIEW, "NewState") <> DllStructGetData($NMLISTVIEW, "OldState") Then
                    ; take care of only newly selected items (not deselected ones)
                    If BitAND(DllStructGetData($NMLISTVIEW, "NewState"), $LVIS_SELECTED) = $LVIS_SELECTED  Then
                        $Item = _GUICtrlListView_GetItem($cLV, $Index)
                        ConsoleWrite("Index:" & @TAB & $Index & @CRLF & "Item:" & @TAB & $Item[3] & @CR)
                        GUICtrlSetData($KeyW, "Index: " & $Index & "   " & $Item[3])
                    EndIf
                EndIf
           EndSwitch
    EndSwitch
    Return $GUI_RUNDEFMSG
 EndFunc   ;==>WM_NOTIFY

Func Reload_ListView()
   ;first clear the current content
   _GUICtrlListView_DeleteAllItems($cLV)
   ;close it within the UDF
   _GUIListViewEx_Close(0)
   ;reload the ListView with data from the array
   _GUICtrlListView_AddArray($cLV, $aLV)
   ;Initiate LVEx - using same filling array
   _GUIListViewEx_Init($cLV, $aLV)
   ;Set all columns editable
   _GUIListViewEx_SetEditStatus($iLV, "*")
EndFunc

;From ResNullius (link cited above)
Func _GuiCtrlGetFocus($hGui = "")
    Local $InputID = ControlGetHandle($hGui, "", ControlGetFocus($hGui))
    Return _ControlGetGuiID($InputID)
EndFunc  ;==>_GuiCtrlGetFocus

Func _ControlGetGuiID($hCtrl)
    Local $Result = DllCall("user32.dll", "int", "GetDlgCtrlID", "hwnd", $hCtrl)
    If @error = 0 Then Return $Result[0]
    Return SetError(1, 0, '')
EndFunc  ;==>_ControlGetGuiID

 

 

Edited by robertocm
Link to comment
Share on other sites

  • Moderators

robertocm,

You are trapping the {ENTER} key with the GUISetAccelerator call - so the UDF never sees it. I am not at all sure why you feel the need to use an Accelerator key here - why not just look for an event in the input like this?

$iMsg = GUIGetMsg()
Switch $iMsg
    Case $GUI_EVENT_CLOSE, $cExit
        Exit
    Case $KeyW
        Reload_ListView()
EndSwitch

Then you do not need the Accelerator key and {ENTER} works fine for editing:

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

#include "GUIListViewEx.au3"

$hGui = GUICreate("", 600, 350)
GUICtrlCreateLabel("Type any letter and press Enter to reload ListView:", 2, 5, 300, 30)

Local $KeyW = GUICtrlCreateInput("", 310, 2, 272, 30)

Global $aLV[6][4]
For $i = 0 To 5
    $sData = "Item " & $i & "-0"
    $aLV[$i][0] = $sData
    For $j = 1 To 3
        $sData &= "|SubItem " & $i & "-" & $j
        $aLV[$i][$j] = "SubItem " & $i & "-" & $j
    Next
Next

;Create ListView
$cLV = GUICtrlCreateListView("Zero Column|One Column|Two Column|Three Column", 2, 33, 580, 260, BitOR($LVS_SINGLESEL, $LVS_SHOWSELALWAYS))
For $i = 0 To 3
    _GUICtrlListView_SetColumnWidth($cLV, $i, 140)
Next

;load ListView with data from the array
_GUICtrlListView_AddArray($cLV, $aLV)
;Initiate LVEx - using same filling array
$iLV = _GUIListViewEx_Init($cLV, $aLV)
;All columns editable
_GUIListViewEx_SetEditStatus($iLV, "*")

$cExit = GUICtrlCreateButton("Exit", 300, 300, 110, 30)

GUISetState()

#cs
    ;Now trying to detect the index of highlighted item in the ListView
    ;From 'A Beginner’s Guide To Melba23’s GUIListViewEx UDF':
    The UDF registers 4 messages automatically – if you already have message handlers in your script,
    do not register them again using the UDF function (set the relevant parameter of _GUIListViewEx_MsgRegister to False)
    but call the relevant UDF handler function (_GUIListViewEx_WM_NOTIFY_Handler) from within your existing handler.
    ;Here an example from Melba23:
    https://www.autoitscript.com/forum/topic/182492-guilistviewex-new-version-27-may-16/?do=findComment&comment=1325933
#ce
GUIRegisterMsg($WM_NOTIFY, 'WM_NOTIFY')
;Register for editing & dragging
;prevent the UDF from initially registering the WM_NOTIFY
_GUIListViewEx_MsgRegister(False)

While 1

    $iMsg = GUIGetMsg()
    Switch $iMsg
        Case $GUI_EVENT_CLOSE, $cExit
            Exit
        Case $KeyW
            Reload_ListView()
    EndSwitch

    ; Allow edit on double click
    $aRet = _GUIListViewEx_EditOnClick()
WEnd

;From Zedna, in 'Highlighted item in the ListView?'
;https://www.autoitscript.com/forum/topic/96234-highlighted-item-in-the-listview/?do=findComment&comment=691927
Func WM_NOTIFY($hWnd, $iMsg, $wParam, $lParam)

    ;From Melba23: pass the same parameters to the UDF handler as you received in your WM_NOTIFY handler:
    _GUIListViewEx_WM_NOTIFY_Handler($hWnd, $iMsg, $wParam, $lParam)

    Local $tNMHDR = DllStructCreate($tagNMITEMACTIVATE, $lParam)
    Local $IDFrom = DllStructGetData($tNMHDR, 'IDFrom')
    Local $Index = DllStructGetData($tNMHDR, 'Index')
    Local $Code = DllStructGetData($tNMHDR, 'Code')

    Switch $IDFrom
        Case $cLV
            Switch $Code
                Case $LVN_ITEMCHANGED
                    $NMLISTVIEW = DllStructCreate($tagNMLISTVIEW, $lParam)
                    ; if state has changed
                    If BitAND(DllStructGetData($NMLISTVIEW, "Changed"), $LVIF_STATE) = $LVIF_STATE And _
                            DllStructGetData($NMLISTVIEW, "NewState") <> DllStructGetData($NMLISTVIEW, "OldState") Then
                        ; take care of only newly selected items (not deselected ones)
                        If BitAND(DllStructGetData($NMLISTVIEW, "NewState"), $LVIS_SELECTED) = $LVIS_SELECTED Then
                            $Item = _GUICtrlListView_GetItem($cLV, $Index)
                            ConsoleWrite("Index:" & @TAB & $Index & @CRLF & "Item:" & @TAB & $Item[3] & @CR)
                            GUICtrlSetData($KeyW, "Index: " & $Index & "   " & $Item[3])
                        EndIf
                    EndIf
            EndSwitch
    EndSwitch
    Return $GUI_RUNDEFMSG
EndFunc   ;==>WM_NOTIFY

Func Reload_ListView()
    ;first clear the current content
    _GUICtrlListView_DeleteAllItems($cLV)
    ;close it within the UDF
    _GUIListViewEx_Close(0)
    ;reload the ListView with data from the array
    _GUICtrlListView_AddArray($cLV, $aLV)
    ;Initiate LVEx - using same filling array
    _GUIListViewEx_Init($cLV, $aLV)
    ;Set all columns editable
    _GUIListViewEx_SetEditStatus($iLV, "*")
EndFunc   ;==>Reload_ListView

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

Dear Melba23,

Using the Accelerator key was just based on a trial and error approach and also the result of copy-paste after reading a similar question in the forum, but without a clear understanding ...

Many Thanks! for your simple and perfect working solution.

---

p.s. Updated the example Phone Book at #138, page 7

This was the article quoted: Want to Connect function to Enter key

Link to comment
Share on other sites

  • 1 month later...
  • Moderators

Sturmi,

I am afraid there is no support for images within the UDF, so I cannot offer any hints.

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

  • Moderators

[NEW VERSION] - 16 Feb 17

Added:

  • Ability to use a user-defined sort function in place of the standard _ArraySort when sorting columns - see _GUIListViewEx_UserSort.

Changed:

  • More edit modes possible - now can have standard text, numeric values with an UpDown control, a combo (either editable or read-only), a date picker, or if all these are not enough a user-defined function. See the _SetEditStatus function header to see how these are set.
  • More options added to the _LoadHdrData function - but the size of the default array the function expects has increased as explained in the function header.
  • Detecting the various events within the ListView has become easier with the introduction of the _EventMonitor function. This is placed in the idle loop and allows the user to detect edit, drag/drop and sort events which may need action. Additionally the function checks for redrawing events (very important if the ListViews are coloured) and shows any tooltips initiated by the UDF. Check out the examples to see how you need to structure the function and interpret its returns.  

The Guide file has been rewritten to explain all the new and amended functionalities - please take a moment to read through it as amending old scripts is not difficult but does require an understanding of what to change and how to change it.

New UDF, examples and Guide file in the zip 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

 

Link to comment
Share on other sites

  • 2 weeks later...

Hi Melba,

how do I allow multi select on a multi columns listview. At least I found nothing in the rtf.

Eg. like in the example 6  the left one.

I would like to allow multi line select (with STRG key).

Is it possible or not with the UDF? (on single col LV it works...)

Tank

Link to comment
Share on other sites

  • Moderators

Tankbuster,

If you use the UDF to add colours within the ListView it is forced to single selection. So if you want multiple selections, you will have to remove all colour attributes.

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

Hi Melba,

thank you for the answer. Of course I will need both , colour and multi selection.... mmmh I need to think of eg separate listview next to the first one for the colorized output.
so it looks like one (and eg. hook the scroll to scroll both up and down)


Anyway, I appreciate what you did with the UDF so far.

Tank

Link to comment
Share on other sites

  • Moderators

powerofos,

As I explained only a few posts above, there is no support for images in the UDF - and I am afraid I have no intention of adding that functionality. Sorry.

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

  • Melba23 changed the title to GUIListViewEx - BugFix Version 6 Apr 24

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

  • Recently Browsing   1 member

×
×
  • Create New...