Jump to content

GUIListViewEx - BugFix Version 6 Apr 24


Melba23
 Share

Recommended Posts

  • Moderators

queensoft,

1. There is no way to "pre-check" an input - you have to look at the new value in the return from the _EventMonitor function and if it is not to your liking reset the previous value  (which is also in the return) using the _ChangeItem function. And you should be able to set a combo to be read only:

; Name...........: _GUIListViewEx_SetEditStatus
; Description ...: Sets edit on doubleclick mode for specified column(s)
; Syntax.........: _GUIListViewEx_SetEditStatus($iLV_Index, $vCol [, $iMode = 1 , $vParam1 = Default [, $vParam2 = Default]]])
; Parameters ....:
[...]
;                  $iMode     - 2 = Editable using combo
;                                   $vParam1 = Content of combo - either delimited string or 0-based array
;                                   $vParam2 = 0: editable combo (default); 1: readonly
;                                                + 2 - Combo list automatically drops down on edit

Please let me know if that is not working.

2. The UDF does not support icons, 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

Thank you for the previous reply, all OK.

 

Now different problem!!

Script:

#include <Array.au3>
#include <GuiConstantsEx.au3>
#include <WindowsConstants.au3>
#include "GUIListViewEx.au3"
#include <Misc.au3>
#include <Debug.au3>


Global $mousefunc = _mouse_function

Global $bHKPressed=False,$bPropertyHKPressed=False
dim $oldm01 = False
dim $m01 = False
dim $v01 = 0
$posx = 0

Global $iCount_Left = 0, $vData, $aLV_List_Left, $aRet, $iEditMode = 0
Global $sel01

$g01 = GUICreate("XXXXXXX", 650, 560)   ; main window


$cListView_Left = GUICtrlCreateListView("Pause|Action|Value 1|Value 2|Modifiers", 10, 100, 630, 300, BitOR($LVS_ICON, $LVS_SINGLESEL, $LVS_SHOWSELALWAYS))
_GUICtrlListView_SetExtendedListViewStyle($cListView_Left, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_GRIDLINES, $LVS_EX_SUBITEMIMAGES)) ; $LVS_EX_CHECKBOXES
_GUICtrlListView_SetColumnWidth($cListView_Left, 0, 90)
_GUICtrlListView_SetColumnWidth($cListView_Left, 1, 110)
_GUICtrlListView_SetColumnWidth($cListView_Left, 2, 120)
_GUICtrlListView_SetColumnWidth($cListView_Left, 3, 120)
_GUICtrlListView_SetColumnWidth($cListView_Left, 4, 170)
; Set font
GUICtrlSetFont($cListView_Left, 12, Default, Default, "Courier New") ; Note edit control will use same font





Global $aLV_List_Left[$iCount_Left]
For $i = 0 To UBound($aLV_List_Left) - 1    ; useless, but I left it here just in case
    $aLV_List_Left[$i] = ''
    GUICtrlCreateListViewItem($aLV_List_Left[$i], $cListView_Left)
Next


$iLV_Left_Index = _GUIListViewEx_Init($cListView_Left, $aLV_List_Left, 0, 0, True, 0)
_GUIListViewEx_SetEditStatus($iLV_Left_Index, '1', 2, 'Click|Drag&drop|Key press', 1+2)
_GUIListViewEx_SetEditStatus($iLV_Left_Index, '4', 2, 'CTRL|ALT|SHIFT|CTRL,ALT|CTRL,SHIFT|ALT,SHIFT|CTRL,ALT,SHIFT', 1+2)
_GUIListViewEx_SetEditStatus($iLV_Left_Index, '0', 1)
_GUIListViewEx_SetEditStatus($iLV_Left_Index, '2', 9, $mousefunc)
_GUIListViewEx_SetEditStatus($iLV_Left_Index, '3', 9, $mousefunc)


$b02 = GUICtrlCreateButton("Insert", 150, 10, 80, 30)
$b03 = GUICtrlCreateButton("Delete", 240, 10, 80, 30)
$b04 = GUICtrlCreateButton("Save list", 370, 10, 80, 30)
$b05 = GUICtrlCreateButton("Load list", 460, 10, 80, 30)

$start01 = GUICtrlCreateButton("START", 275, 510, 100, 30)


GUISetState(@SW_SHOW, $g01)

_GUIListViewEx_MsgRegister()
_GUIListViewEx_SetActive(1)


; main program loop
While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE   ; close button
;~          GUIRegisterMsg(0x007E,"")   ;   WM_DISPLAYCHANGE 0x007E
            ExitLoop


        Case $b02   ; insert row
            $vData = '||||'
            $iCount_Left += 1
            _GUIListViewEx_Insert($vData)

        Case $b03   ; delete selected row
            _GUIListViewEx_Delete()

        Case $b04
            $f01 = FileSaveDialog('Save tasks list', @ScriptDir, 'Text files (*.txt)', 16)
            if $f01<>'' Then
                _GUIListViewEx_SaveListView($iLV_Left_Index, $f01)
            EndIf

        Case $b05
            $f01 = FileOpenDialog('Load tasks list', @ScriptDir, 'Text files (*.txt)', 1+2)
            if $f01<>'' Then
                _GUIListViewEx_LoadListView($iLV_Left_Index, $f01)
            EndIf


        Case $start01
            For $i = 0 To _GUICtrlListView_GetItemCount($cListView_Left)-1
            
            Next

    EndSwitch

    $vRet = _GUIListViewEx_EventMonitor($iEditMode) ; Use combos to change EditMode
    If @error=2 Then
        MsgBox(64+$MB_SYSTEMMODAL, "Error", "You clicked an empty task." & @CRLF & "Either select an existing task or use 'Insert task' button.")
    EndIf
    If (@error<>2) and (@error<>0) Then
        MsgBox(64+$MB_SYSTEMMODAL, "Error", "Error: " & @error)
    EndIf
    Switch @extended
        Case 0
            ; No event detected
        Case 1
            If $vRet = "" Then
;~              MsgBox($MB_SYSTEMMODAL, "Edit", "Edit aborted" & @CRLF)
            Else
;~              _ArrayDisplay($vRet, "ListView " & _GUIListViewEx_GetActive() & " content edited", Default, 8)
                if ($vRet[1][1]=1) and ($vRet[1][3]='Key press') Then
                    $inp = InputBox("Select key to press", "Select key to press")
                    If $inp<>"" Then
                        _GUIListViewEx_ChangeItem($iLV_Left_Index, $vRet[1][0], 1, $inp)
                    EndIf
                EndIf
;~              _DebugArrayDisplay($aLV_List_Left)
            EndIf
        Case 2
            If $vRet = "" Then
;~              MsgBox($MB_SYSTEMMODAL, "Header edit", "Header edit aborted" & @CRLF)
            Else
;~              _ArrayDisplay($vRet, "ListView " & _GUIListViewEx_GetActive() & " header edited", Default, 8)
            EndIf
        Case 3
;~          MsgBox($MB_SYSTEMMODAL, "Sorted", "ListView: " & $vRet & @CRLF)
        Case 4
;~          MsgBox($MB_SYSTEMMODAL, "Dragged", "From:To" & @CRLF & $vRet & @CRLF)
    EndSwitch



WEnd    ; end main loop



;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Func _mouse_function($s1, $s2, $s3, $s4)
    $sel01 = _GUICtrlListView_GetSelectedIndices($cListView_Left, True)
    if UBound($sel01) > 1 Then
        ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : ******************** OK = '  & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console
    EndIf
EndFunc
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Steps to reproduce problem:

1. Click INSERT button - a new empty line is inserted - lines 74-78

2. Double click each cell, add some values.

Example:

Pause = 0

Action = choose any value from dropdown

Value 1 / Value 2 = does nothing in the ListView, but ConsoleWrite ******************** OK = - lines 158-163.

Modifiers = choose any value from dropdown

3. Click SAVE button = save ListView to file

4. Click LOAD button = load previous file

5. Double click each cell again.

Pause = 0 - works OK

Action = choose any value from dropdown - works OK

Value 1 / Value 2 = error

GUIListViewEx.au3" (3324) : ==> Variable cannot be accessed in this manner.:
$vRet = $hUserFunction($hGLVEx_SrcHandle, $iLV_Index, $aLocation[0], $aLocation[1])
$vRet = $hUserFunction^ ERROR

Modifiers = error: there is no dropdown displayed

Link to comment
Share on other sites

  • Moderators

queensoft,

The problem is caused because there are 2 columns calling a user-defined function. When the ListView is saved they do not store correctly and corrupt the data file and its subsequent loading. This happens because when I wrote the load/save functions editing by using a user-defined function was not an option - I will look into how to get the load/save functions to play nicely now that it is.

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

queensoft,

I think I have it working properly now. You have to redeclare the user-defined function when you reload the ListView as the "function as object" cannot be stored in the text format file used to store the ListView data. So you need to do this:

Case $b05
    $f01 = FileOpenDialog('Load tasks list', @ScriptDir, 'Text files (*.txt)', 1+2)
    if $f01<>'' Then
        _GUIListViewEx_LoadListView($iLV_Left_Index, $f01)
        _GUIListViewEx_SetEditStatus($iLV_Left_Index, '2', 9, $mousefunc)
        _GUIListViewEx_SetEditStatus($iLV_Left_Index, '3', 9, $mousefunc)
    EndIf

And use this Beta of the UDF: GUIListViewEx_Combined.au3

Please let me know if it works for you too.

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

Custom function is fixed, you da man (woman? person?) !!!

Last column (Modifiers) dropdown list is NOT fixed.

I think that is also fixed, I was using an old save file.

Edited by queensoft
Link to comment
Share on other sites

  • 3 weeks later...
  • Moderators

Champak,

The UDF cannot read your mind - if you insert a column you will need to use the _SetEditStatus function to tell the UDF what you want to happen on a double click.

If that does not work then post a simple reprocucer script and I will investigate further.

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 did that, i put seteditstatus right after insert, unless I did it wrong. I'll look at the code again. I would think the example 6 would be set up to insert and use columns the same way rows are to demonstrate capabilities. I'll check and let you know.

 

EDIT: Found my mistake, I have two listviews happening here, and while I was editing one, I was setting the status of the other one.😞

Edited by Champak
Link to comment
Share on other sites

  • Moderators

Champak,

Glad you found your error.

As to the Examples demonstrating every functionality of the UDF. I am afraid you are asking way too much as it has become so complex that it is no longer possible. Especially when it involves complex user interaction such as inserting columns and setting their edit status.

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 - New Version 26 Feb 24
  • Moderators

[NEW VERSION] - 26 Feb 24

Added: A column re-order event is now indicated by _EventMonitor setting @extended to 6.

Changed:

  • Event 4 (drag/drop) now returns a 4 element array [from index, to index, dragged row, inserted row]
  • Parameters for editing with combos have been altered/expanded

Fixed

  • ListViews with custom function on editing (Mode 9) will now save correctly - although the function must be reassigned after reloading.
  • Colours work when using _InsertSpec functions.
  • Checkboxes and selected rows play nicely together.

Thanks to those who pointed out the bugs and asked for new functionalities.

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

 

Link to comment
Share on other sites

  • 1 month later...

Hi Melba23,

I love this LV extension, many thanks for providing it. Unfortunately, I think I have found a bug.

I wrote a Home Accounts system in AutoIt last year and this uses a LV as the main control to display transactions on the primary screen. Typically the LV holds 150-200 rows with about 40 rows visible at any time (one month's transaction across all my accounts). I make use of the _GUICtrlListView_Scroll function, Top and Bottom buttons wil scroll the LV to the first/last transaction and my refresh routine will delete and reload the LV after any transaction update and then scroll back to the last edited transaction. This all works fine and I use the text/background colours a lot also.

I recently extended the project to enable a child dialogue that contains a similar LV with another version of these transactions listed (a year's transactions for a single account). When I need to scroll this 2nd LV on the child dialogue the whole AutoIt app will often crash. When this happens the 2nd LV goes blank and AutoIt freezes, a few times I have received an error dialogue referencing a row within GUIListViewEx.au3 (array dimension out of range). Killing the AutoIt process is the only way out of this.

After a bit of debugging I have found that if the scroll offset takes the 2nd LV to a currently visible row (even if only partially visible) then the scroll will work correctly, but as soon as the scroll offset references a non-visible row then the crash happens. But this only applies to the 2nd LV within the child dialogue. To test this I used a fixed scroll offset value (800 = 40 rows),  which works until I reduced the height of the LV below this, then it crashes.

I was using the April 2022 version but have now updated to the February 2024 code and retested, but the issue is just the same.

Best Regards,

Terry

Link to comment
Share on other sites

  • Moderators

TerryF,

Once the grandkids have gone home after Easter I will take a look. But it would greatly help if you could let me have a simple reproducer script so that we are at least working from the same baseline.

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 again Melba23,

Your request to provide a simple script led me to experiment more trying to make such a script and then to figure out the error in my code, though you might want to catch this issue in a more graceful way in a future update.

Within the _GUIListViewEx_Init call for the child LV, I specified +16 as an added feature (use coloured header) but then failed to call _GUIListViewEx_LoadHdrData within the child LV code at all. This scenario results in the crash/freeze I mentioned, with no error message. I guess the scroll code is confused with the header in some way. If I remove the +16 from the Init call or load the header data then all is well. I used the +16 in my original main LV init call but also set the header data, so that LV worked fine.

Best regards,

Terry

Link to comment
Share on other sites

  • Moderators

TerryF,

Many thanks for doing the detective work! I will look at how I might "catch this issue in a more graceful way" 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

  • Moderators

TerryF,

The kiddos are of at an Easter egg hunt while I am cooking lunch, so I had a few moments to see if I could come up with something. Can you please test this Alpha version with your original script - the one without the _LoadHdrData call - and let me know if it makes a difference: GUIListViewEx_HdrTest.au3

Thanks in advance,

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

Sorry for the slow reponse on this.

Yes, this seems to fix the issue, the 2nd LV scrolls fine and now behaves well despite the lack of a call to _LoadHdrData within this part of the code.

Many thanks for looking into this issue.

Best regards,

Terry

Link to comment
Share on other sites

  • Moderators

TerryF,

Glad to hear it - thanks for testing. 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

 

Link to comment
Share on other sites

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

[BUGFIX VERSION] - 6 Apr 24

Fixed: UDF failed if header colours were initialised but not specifically set.

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

 

Link to comment
Share on other sites

  • 2 weeks later...
On 2/17/2021 at 10:06 AM, Melba23 said:

rony2006,

Here is a Beta UDF with a new function: GUIListViewEx_Select.au3

; #FUNCTION# =========================================================================================================
; Name...........: _GUIListViewEx_SelectItem
; Description ...: Programatically selects a row, and item if single selection available
; Syntax.........: _GUIListViewEx_SelectItem($iRow[, $iCol])
; Parameters ....: $iRow - 0-based row to select
;                  $iCol - 0-based column to select - only if single cell selection is available
; Requirement(s).: v3.3.10 +
; Return values .: Success: 1
;                  Failure: 0 and sets @error as follows:
;                               1 = Invalid row parameter
;                               2 = Invalid column parameter
; Author ........: Melba23
; Modified ......:
; Remarks .......: Operates on active ListView - use _GUIListViewEx_SetActive to select
; Example........: Yes
;=====================================================================================================================

Please let me know if it meets your requirements.

M23

Melba23,

First off, thank you for all of your contributions to the community. You rock!
Having an issue with deselcting a row of data after it has been colored to indicate a state.
I have tried...
using -1 to deselct all - no luck
using 0,0 for the arguement - no luck
Tried selecting the main gui window and it still won't un select the line that is selected in blue.

I even grabbed a piece from one of your functions where you specifically state to unselect the row.

It's gotta be the user (ME!) but I can't see where I am going wrong.

I'm open to any all solutions where  someone has successfully unselected a row.

Thank you all for your help and time!
 

Link to comment
Share on other sites

  • Moderators

SpeedyKiwi,

Welcome to the forum.

I have just tested the _SelectItem function on a ListView and it works fine! So please let me have a short reproductor script that shows the problem and I will investigate further.

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

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   0 members

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