Jump to content

GUIListViewEx - BugFix Version 6 Apr 24


Melba23
 Share

Recommended Posts

  • Moderators

Hi all,

After the recent additions and fixes, here is another Beta for testing:

Quick summary of the changes - you can find various example scripts in the earlier posts of this thread:

  • Option to disable header resizing.
  • Custom editing a column using a user-defined function
  • Custom sorting a column using a user-defined function
  • Option for an "auto dropdown" option when using combo/DTP to edit
  • Option for an updown in a text input

M23

Edited by Melba23
New Beta code uploaded

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

  • 4 weeks later...
On martes, 28 de junio de 2016 at 6:43 PM, Melba23 said:

After the recent additions and fixes, here is another Beta for testing:

Dear Melba23,

Many thanks for your work which I really appreciate.

testing 'GLVEx_Example_6' with the new Beta version of the UDF, I'm getting this error message:

line (3367) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.:
If $aColSplit[2] == "" Then
If ^ ERROR

Link to comment
Share on other sites

  • Moderators

robertocm,

Which 'GLVEx_Example_6' are you running - the Beta does not have specific example scripts ? Are you running the example script as written or have you amended it in any way? Which version of AutoIt are you running?

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

18 hours ago, Melba23 said:

Which 'GLVEx_Example_6' are you running

Dear Melba23,

I got the examples from the first post (those included in zip file on the first page), without any modification,

then replaced the original GUIListViewEx.au3 for your beta version from the link in this page 5.

I've just reproduced now this steps with the same error.

System info: Windows XP SP3, AutoIt v3.3.14.2,

Many Thanks,

Link to comment
Share on other sites

  • Moderators

robertocm,

The Beta version uses a different format for the $aHdrData array used (unsurprisingly) to set the header data - the array now has 4 rows rather then the original 3. I did explain somewhere in this thread that earlier version scripts might not work with the Beta - my apologies, I should have been more explicit when asking readers to look for examples in the thread.

Try this version of the example script - it has been modified to work with the Beta: I leave seeing what changed as "an exercise for the student" , as my old maths master used to say. 

M23

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

Dear Melba23,

Solved!

Another issue with the Beta is with BackSpace "HotKey" in examples #1 to #4:

Selecting any editable item (for example in first column for example 1),

BackSpace seems to always activate the first Header, an not the item (only double click option working in my case)

Many Thanks

Link to comment
Share on other sites

  • Moderators

robertocm,

Looks like there was a bug in the "Edit by HotKey" code - that is why this version is still in Beta!

Please try this amended version and see if it works for you - it does for me:

M23

Edited by Melba23
Beta code removed

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 thanks to you for finding the bug.

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

Just updated to last version from #1 (not the beta) .... (if you don't tell I used a version from Aug 2013 - never change a working app :-) )
. Needed to update as someone found a bug after 3 years.

Still awesome and with just changing 4 lines (and add two new), my code was working again.
And the old bug was gone too (and that was the plan)

Great job. Thx.

Link to comment
Share on other sites

  • Moderators

Tankbuster,

Glad you found it not too difficult to update - and that the bug was fixed.

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

  • 3 weeks later...

hello all , 

i am a beginner at autoit ,

i am trying to use this udf To color (background or text) individual rows/columns/cells ,

i took the GLVEx_Example_1.au3 and used the : _GUIListViewEx_SetColour function but noting seems to happen

what i tried to do : 

_GUIListViewEx_SetColour($hListView_Right,"0x0000FF;0xFF0000",2,2) 

i read the help file :

"You can set the default colours for the ListView items, both normal and selected, using _GUIListViewEx_SetDefColours and optionally pass an array to colour specific items using _GUIListViewEx_LoadColour. You can later amend the colour of a specific item using _GUIListViewEx_SetColour. Note that using colours automatically limits the selection to a single row."

but i cant seems to get it to work,

when i read the @error flag i get a return value of 0 ?

can some one show me an example how to do it ? 

thanks lampel

Edited by lampel
Link to comment
Share on other sites

  • Moderators

lampel,

From that snippet, you are using the ListView handle to identify it - when using the UDF functions, you need to use the index returned when you initialise the ListView. So I suggest trying:

_GUIListViewEx_SetColour($iLV_Right_Index,"0x0000FF;0xFF0000",2,2)

The use of the index is explained in the _GUIListViewEx_SetColour function header:

; #FUNCTION# =========================================================================================================
; Name...........: _GUIListViewEx_SetColour
; Description ...: Sets text and/or back colour for a user colour enabled ListView item
; Syntax.........: _GUIListViewEx_SetColour($iLV_Index, $sColSet, $iRow, $iCol)
; Parameters ....: $iLV_Index - Index of ListView

Come back if that does not do the trick.

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

i did use the Handle and not the index ,

after the change its working fine !

another question :

is it possible to color each cell with black rectangle border over a white background? 

i added a picture to demonstrate how i want it to look 

 

black_rectangle_border.jpg

Link to comment
Share on other sites

  • Moderators

lampel,

I suggest using the $LVS_EX_GRIDLINES extended style when creating the ListView to get that effect.

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

lampel,

Delighted you like the UDF - and never be afraid to ask 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

 

Link to comment
Share on other sites

  • 3 weeks later...

Melba,

I am currently using GuiListViewEx as the core of my application.  I am currently reading the check boxes by looping through the listview looking for the checked item.  This works but is expensive to do.  Is there a way of using _GUIListViewEx_WM_NOTIFY_Handler to look for the event and simply read the row that was clicked.

 

I have tried adding something like the below into your WM_Notify function and cannot seem to get it to detect a click of the checkbox.

 

Case $NM_CLICK
            $Check = _GUICtrlListView_GetItemChecked($hGLVEx_SrcHandle ,$iCol)
            ConsoleWrite($Check & @CRLF)

 

what's your recommendation for detecting a check box has been clicked and return the data in the corresponding row.

 

Thanks

 

 

Edited by bourny
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   0 members

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