Jump to content

Tracking list items between source array and ListView with indexes


briankyncl
 Share

Recommended Posts

Hello, I have an application populating a ListView. It iterates through a 2D array, adds the item to the ListView using GUICtrlCreateListViewItem(), and saves the returned controlID back into the 2D array. I then reference this controlID elsewhere in the application to read and modify the checkbox state of the item in the ListView.

I'd like to transition to populating the ListView with _GUICtrlListView_AddItem() or _GUICtrlListView_AddArray() but if an index (the position of the item in the ListView?) is returned by these functions, how do I keep track of the items relative to the original array when the item positions change, such as when a column header is clicked for sorting?

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