Hello. I have three ListBoxes (boxMain, boxA, boxB) on a Form: Item 1 on boxMain matches with Item 1 on boxA and Item 1 on boxB and so on. Multiple items can be selected in all ListBoxes.
Here's what I want to implement, with the help of an example:
(1)If User scrolls to Item 10 in boxMain, Items 10 in boxA and boxB also come into view. This, I've been able to achieve by having a scroll event. It doesn't work if I scroll via the scroll-bar at a slow pace. But otherwise it works well. Can this be improved? How can it be improved?
(2)If User selects Item 10 in boxMain, Items 10 in boxA and boxB gets selected as well. But the User can then decide to de-select Item 10 in one or both of the ListBoxes boxA, boxB; de-selecting both deselects Item 10 in boxMain.
Okay, it's rather complicated. But what I am really stuck at is this:
(1)How can the last selected-index or last de-selected-index be obtained from a ListBox? For example, if the selected indices are [0, 3, 7, 9] and I select Item 5, how can I obtain "5"? And if I de-select Item 3, how can I obtain "3"?
(2)Am I even using the right control for this? Would I be better off with a Tree-View?
Thanks!