Jump to content
Melba23

GUIListViewEx - BugFix Version 14 Jun 20

Recommended Posts

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

 

Share this post


Link to post
Share on other sites

I love your UDF...  ;)

 

 


ill get to that... i still need to learn and understand a lot of codes graduated.gif

Correct answer, learn to walk before you take on that marathon.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

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

 

Share this post


Link to post
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,

Share this post


Link to post
Share on other sites

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

 

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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

 

Share this post


Link to post
Share on other sites

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

 

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

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

 

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

 

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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

 

Share this post


Link to post
Share on other sites

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

 

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...