Jump to content

Recommended Posts

Posted

Hello all,

First of all, I must say I love AutoIt. I'm a long time programmer but never heard of it until recently, have been using it ever since.

I got a question concerning listviews (GUICtrlCreateListView()); How am I able to get the selected item ID (ID returned from GUICtrlCreateListViewItem())?

The situation is this; I have a listview with a few items and I made a context menu for it, but I find myself unable to be able to retrieve the item ID that is selected (After invoking the context menu event).

Kind regards,

Myrddin

Posted

  On 7/29/2009 at 11:03 PM, 'wraithdu said:

_GUICtrlListView_GetSelectedIndices() or _GUICtrlListView_HitTest()

Hello Waithdu,

I already looked at _GUICtrlListView_GetSelectedIndices(), it returns the listview item number instead of the ID, because the items are spawned in random order it is no use to me.

Didn't knew about _GUICtrlListView_HitTest(), found _GUICtrlListView_SubItemHitTest(), but this function also returns the number, and not the ID.

Kind regards,

Myrddin

Posted

  On 7/30/2009 at 3:09 PM, 'AdmiralAlkex said:

Is it the controlID you want? Use GUICtrlRead() if your items was creted with GUICtrlCreateListViewItem().

  Quote

ListView Control identifier (controlID) of the selected ListViewItem. 0 means no item is selected

Thank you so much! I have been looking everywhere, this was the only place I didn't look. Thank you so much.

Kind regards,

Myrddin

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