Sign in to follow this  
Followers 0
Swimming_Bird

How do you read the state of a GUICtrlCreateListViewItem control?

7 posts in this topic

For my Listview the styles i'm using are $LVS_SHOWSELALWAYS+$LVS_NOSORTHEADER. I want to be able to select as many items as they want then using a while loop go though the controls to find which ones are selected or checked if i use $LVS_EX_CHECKBOXES. However regardless of the state GUICtrlGetState always returns 80 on the ListViewItem's control. GUICtrlRead only gives me the data stored in the control i have selected.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

use the latest beta ( http://www.autoitscript.com/autoit3/files/beta/autoit )

the beta provides you with a lot of aditional functions (read the help-file)

for example _GUICtrlListViewGetCheckedState() returns the check state for a list-view control item

Edited by rakudave

Share this post


Link to post
Share on other sites

is there any way of yet to do it without needing the $LVS_EX_CHECKBOXES command?

Share this post


Link to post
Share on other sites

the issue is that doesnt return if multiple items are selected. what i'd ideally like to do is have a list that i can select multiple items from using shift/ctrl clicks and have it do whatever based on what's selected.

Share this post


Link to post
Share on other sites

the issue is that doesnt return if multiple items are selected. what i'd ideally like to do is have a list that i can select multiple items from using shift/ctrl clicks and have it do whatever based on what's selected.

Try looking in the help

_GUICtrlListViewGetSelectedIndices


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

lol i was just about to post hat i found that command while browsing though the beta help file

thanks though. i'm messing around with it now

I'm quite amaized by how many new functions are in the beta simply with regard to ListView. I'm definately gonna have to spend some more time browsing the whole thing with this multitude of new functions availible.

Edited by Swimming_BIrd

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
Sign in to follow this  
Followers 0