Less memory-efficient, but easier, would be to create a copy of the original array that contains only matching units. Then you can use the same code to populate the list box and respond to selection. Just make the original array two-dimensional and use index 0 for the main list and index 1 for the filtered list (as well as two separate variables to track the number of elements in each list).
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Less memory-efficient, but easier, would be to create a copy of the original array that contains only matching units. Then you can use the same code to populate the list box and respond to selection. Just make the original array two-dimensional and use index 0 for the main list and index 1 for the filtered list (as well as two separate variables to track the number of elements in each list).