briankyncl Posted October 10, 2019 Posted October 10, 2019 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?
briankyncl Posted October 10, 2019 Author Posted October 10, 2019 After digging through the Help file more, I found the following functions which look like they'll solve my question. _GUICtrlListView_MapIndexToID _GUICtrlListView_MapIDToIndex A good example of these functions in use found here.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now