Jump to content

Recommended Posts

Posted

New test using last beta's (UDF & example), both files unrenamed from now on :
1) Select 1st visible line in LV
2) Click 6 times the "Del" button :

>"C:\Program Files\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Documents and Settings\Administrateur\Mes documents\Nouveau dossier\GUIListViewEx_Test_Script.au3"    
"C:\Documents and Settings\Administrateur\Mes documents\Nouveau dossier\GUIListViewEx_Test.au3" (1453) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.:
If $vRet[0][0] <= $aSplit[2] Then
If ^ ERROR
>Exit code: 1    Time: 9.165

You can generate the same error doing this :
1) Clic "Del" 5 times
2) Select the only remaining line
3) Clic "Del" once, when only 1 selected line is remaining.

  • Moderators
Posted

pixelsearch,

You do love deleting everything in the ListView! Here is a version with some modified checks for an empty ListView after deletion.

M23

GUIListViewEx_Test.au3

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

  • Moderators
Posted

pixelsearch,

Delighted to hear it. I will do some tidying of the code and then release a new version.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

  • Moderators
Posted

[BUGFIX VERSION] - 18 Mar 20

Fixed:

Several bugs which appeared when all rows or columns were deleted - thanks to pixelsearch for his diligence in finding them.

Changed:

To make it easier for the user, the _GUIListViewEx_ContextPos will now return an error if the right-click was not on an item - Example 6 amended to reflect this.

New zip file with UDF, examples and guide in the first post of the thread.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Posted (edited)
On 3/14/2020 at 7:01 PM, Melba23 said:

And as we in Spain are now virtually confined to our houses for the next 2 weeks (at least) thanks to Covid-19

Remember you have good friends in Spain,

 

@pixelsearch, Thanks!, and let me take your phrase:

On 3/16/2020 at 7:11 AM, pixelsearch said:

It's the least we can do for a person like you who help us so much :)

 

Edited by robertocm
  • Moderators
Posted

robertocm,

Muchas gracias para tus palabras, mi amigo.

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

 

  • 5 weeks later...
Posted

thanks for your UDF, but I get an error when loading Listview from the save file which has more than 6 column. It show an error:

--> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop
"H:\Marketting\Sharing Online Tool\GUIListViewEx.au3" (871) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.:
$aHdrData[0][$i] = $aHeader[$i][0]
^ ERROR

 

  • Moderators
Posted

langthang084,

Please post a copy of the saved file and a reproducer script which fails when you try to reload from it. Otherwise I can do nothing.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

  • Moderators
Posted

langthang084,

I found the problem and I believe I have fixed it - try this version and see if works for you now: GUIListViewEx_Load.au3

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

  • Moderators
Posted

langthang084,

Thanks for the confirmation - i will release a bugfix version this weekend.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

  • Moderators
Posted

[BUGFIX VERSION] - 18 Apr 20

Fixed:  A bug in the _Load function - thanks to langthang084 for finding it.

Added:  _EventMonitor now also returns a value in @extended for a column resize.

New 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

 

  • 3 weeks later...
Posted

Found a bug or an error in the documentation... _GUIListViewEx_ReadToArray states that it returns either a 2D array or an empty string, but it will never return an empty string. If there is no data, it will return an array like [[0]] :)

All my code provided is Public Domain... but it may not work. ;) Use it, change it, break it, whatever you want.

Spoiler

My Humble Contributions:
Personal Function Documentation - A personal HelpFile for your functions
Acro.au3 UDF - Automating Acrobat Pro
ToDo Finder - Find #ToDo: lines in your scripts
UI-SimpleWrappers UDF - Use UI Automation more Simply-er
KeePass UDF - Automate KeePass, a password manager
InputBoxes - Simple Input boxes for various variable types

  • Moderators
Posted

seadoggie01,

Thanks for that. I seem to remember that I had to change the "empty ListView" return to prevent a crash elsewhere. I will fix it in the next release.

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

 

  • 4 weeks later...
Posted

Hi all.

Just starting to dip my toes in the GuiListViewEx water.  So far so good.  Before I go too far down this path, I just wanted to confirm that what I think is true must be true:

Once having created a ListView with _GUICtrlListView_Create(), and then having initialized it with _GUIListViewEx_Init() -- one can still call the distributed UDF functions (i.e., the UDF functions distributed with AutoIt -- _GUICtrlListView_GetSelectedIndices(), _GUICtrlListView_GetItem(), _GUICtrlListView_ClickItem(), and the like), intermingled with the GUIListViewEx calls.

And when using the distributed UDF functions, one continues to pass the the handle that _GUICtrlListView_Create() returned.  But when calling the GUIListViewEx functions, one passes the index value that _GUIListViewEx_Init() returned?

I think this must be right; just wanted to make sure.

Thanks!

/John

  • Moderators
Posted

DrJohn,

Why not post this in the dedicated GUIListViewEx UDF thread as it is specific to the UDF?

Anyway, you are pretty close. Any changes to the ListView must be made using the UDF functions - so that the UDF can track the changes and keep its internal shadow arrays up-to-date. Using the GUICtrlListView_* functions should work - but be careful if you get into any of the esoteric UDF functionality involving colour and/or single cell selection as the UDF takes over a lot of the standard internal ListView functions and the "selected" highlight is run by the UDF and not Windows. Hence the need for the _GUIListViewEx_GetLastSelItem (Get last selected item in active or specified ListView) function in the UDF as the standard functions will not return sensible values. Normally this is not a problem, but you need to be aware of it.

And if you do suddenly find the need for a new function because the standard one does not work I am usually happy to see if I can oblige.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Posted
1 hour ago, Melba23 said:

Why not post this in the dedicated GUIListViewEx UDF thread as it is specific to the UDF?

😬  Didn't notice there was one ...

1 hour ago, Melba23 said:

Anyway, you are pretty close. Any changes to the ListView must be made using the UDF functions - so that the UDF can track the changes and keep its internal shadow arrays up-to-date. Using the GUICtrlListView_* functions should work - but be careful if you get into any of the esoteric UDF functionality involving colour and/or single cell selection as the UDF takes over a lot of the standard internal ListView functions and the "selected" highlight is run by the UDF and not Windows. Hence the need for the _GUIListViewEx_GetLastSelItem (Get last selected item in active or specified ListView) function in the UDF as the standard functions will not return sensible values. Normally this is not a problem, but you need to be aware of it.

That makes sense.  I hadn't planned on doing single-cell selection; color possibly.  And I do have some code that both queries and changes the selected item (I'm endeavoring to put this in place of existing ListView code, as I imagine is often the case).  I'll be on the lookout for UDF functions to use instead of _GUICtrlListView_* functions.

 

1 hour ago, Melba23 said:

And if you do suddenly find the need for a new function because the standard one does not work I am usually happy to see if I can oblige.

Better try to get my head around what's there already first.  🙂

Thanks again!

/John

  • Moderators
Posted

DrJohn,

Quote

I do have some code that both queries and changes the selected item

If you want to change the content, you must use a UDF function - _GUIListViewEx_ChangeItem (Programatic change of specified ListView item) seems a likely candidate.

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

 

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...