Jump to content

returning ListView item selected


Recommended Posts

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



Link to comment
Share on other sites

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.


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

Link to comment
Share on other sites

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

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...