Jump to content

ListView Selection and Checkboxes


Recommended Posts

To hopefully prevent any confusion - the early posts in this thread have been split from the GUITreeViewEx thread as the requested functionality has no overlap with my TreeView UDF. The new thread title reflects the actual thread subject

M23

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Quote

A recent thread dealt with getting TreeViews with checkboxes to automatically check/clear associated items when a checkbox was actioned. It seemed like a good idea for a UDF and so here it is.

@Melba23Is there a simple way to take what you have done for treeviews in this UDF and apply it to a listview control instead?  Maybe make it a feature in your already excellent GUIListViewEx UDF?

Edited by Melba23
Split posts and renamed thread
Link to comment
Share on other sites

  • Moderators

MattHiggs,

Quote

Is there a simple way to take what you have done for treeviews in this UDF and apply it to a listview control instead?

I rather doubt it!

Anyway, how exactly do you see this sort of functionality being useful in a ListView? A TreeView has a very clear parent/child structure which is completely absent in a ListView - so I have difficulty seeing just what you expect to happen when specific ListView items are checked/unchecked.

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

On 1/26/2019 at 4:19 AM, Melba23 said:

MattHiggs,

I rather doubt it!

Anyway, how exactly do you see this sort of functionality being useful in a ListView? A TreeView has a very clear parent/child structure which is completely absent in a ListView - so I have difficulty seeing just what you expect to happen when specific ListView items are checked/unchecked.

M23

@Melba23.  Really?  I wouldn't think it would be hard to do, much less impossible.  This is what I am trying to accomplish:

f08ZKM1.gif

 

Rather than what an autoit listview control currently does when checking a checkbox next to a listview item:

Yv9Hnmw.gif

Still the same answer?

Link to comment
Share on other sites

  • Moderators

MattHiggs,

So you want checked items in a ListView to also be selected? And what do you want to be the trigger to get them unchecked/selected? I am afraid that functionality is nothing like the function of my TreeView UDF.

I suggest you open a new thread and see what might be suggested.

Quote

Really?  I wouldn't think it would be hard to do, much less impossible

Or, if that is your considered opinion, code something suitable yourself.

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

 

1 hour ago, Melba23 said:

So you want checked items in a ListView to also be selected?

Exactly. And when the checkbox is unchecked, the listview item would also be deselected.  
 

1 hour ago, Melba23 said:

And what do you want to be the trigger to get them unchecked/selected? 

I am confused.  Didn't you answer this question in the previous sentence?  If not. I am must not be understanding something.

1 hour ago, Melba23 said:

Or, if that is your considered opinion, code something suitable yourself.

Woah.  Hold on now.  I meant no disrespect.  I wouldn't be asking about this if I knew how to implement it.  I just figured that the default behavior for a listview which includes checkboxes next to its items would be to select the item when checked and deselect it when unchecked.  I would never expect (and have never seen)  iistviews to behave the way they do in autoit, so I figured it wouldn't be to hard for someone of your skill to implement it.  

Link to comment
Share on other sites

  • Moderators

MattHiggs,

Answering your points in order:

- So the functionality is nothing like that produced by my TreeView UDF.

- Your video does not show items being unchecked, so I had no idea what was happening in that case - hence my question.

- Then we misunderstood each other - but as ListViews and TreeViews are very different beasts I doubt there is much that could be read across from one to the other.

Anyway, now we have determined what you do want to do I am going to split off these posts from the TreeView UDF thread (as there is no connections at all) and start a new thread for you.

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