Jump to content
Sign in to follow this  
Icpic

returning ListView item selected

Recommended Posts

Icpic

Hi All,

Just a small question about ListView Control and how to return the item Text for a select row.

is there a function which returns the index of which row is selected?

I know there is a function which returns True/False depending on if the row is selected "_GUICtrlListView_GetItemSelected", so does this mean I have to loop through all items in a ListView Control with a counter, find the one which is true, then loop through all items using this counter?

Hope this all makes sense

Thanks

Icpic

Share this post


Link to post
Share on other sites
YellowLab

Check out

#Include <GuiListView.au3>

_GUICtrlListView_GetItemText($hWnd, $iIndex[, $iSubItem = 0])

in the UDF section of the help file.

I think this is what you are looking for.

Bob


You can't see a rainbow without first experiencing the rain.

Share this post


Link to post
Share on other sites
Icpic

Thanks for the reply,

I am already using the _GUICtrlListView_GetItemText($hWnd, $iIndex[, $iSubItem = 0]) function to get the text itself, but to find the index of the selected item I guess there is no function which will return it right? I will need to use _GUICtrlListView_GetItemSelected and loop through all items and find which is selected

Share this post


Link to post
Share on other sites
rasim

Icpic

_GUICtrlListView_GetSelectedIndices() :P

Share this post


Link to post
Share on other sites
Icpic

rasim - Thanks mate...now why didn't I see that in the help file!!!! it was right there and it is exactly what i am looking for :P

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.