-
Is there a way to scroll 2 listboxes at the same time to keep the items aligned? The listboxes will always have the same number of items. For example, when listbox1 is scrolled, listbox2 scrolls along with it and vice-versa. Thanks for your help!
-Gabe
-
Basically you could set the scrollbar.value of textbox2 to the same value of the scrollbar.value of textbox1 when the mouseover occurs.
-
Listboxes don't have a scroll property, just a scroll event. (or do they?) None that I can find anyway... Would this be an API issue?
-
Code:
Private Sub List1_Click()
List2.ListIndex = List1.ListIndex
End Sub
Private Sub List2_Click()
List1.ListIndex = List2.ListIndex
End Sub
-
Thanks for the replies. I am already using the index number to keep corresponding items selected between the two listboxes. However, I would like to keep the selected items aligned as well so when the user scrolls in one listbox the corresponding selected item the other will scroll and remain horizontially aligned. In simpler terms, when one listbox scrolls, the other scrolls with it. Thanks again for any help.
-
<?>
this is all you need...
Code:
Private Sub list1_scroll()
List2.TopIndex = List1.TopIndex
End Sub