|
-
Jan 25th, 2000, 11:20 AM
#1
Thread Starter
Member
hi, I need a little help with listboxes. Lets say I have list1, list2, and list3 filled with enough info that all 3 have horizontal scroll bars. How can I make my program autoscroll the list boxes with the scroll of any one. IE if I scroll list1 down I want list2 & 3 to scroll with it. Please email me at [email protected]
Thanks
Richard
-
Jan 25th, 2000, 05:55 PM
#2
Lively Member
Well.. This in not exactly what you asked for but what I know is it not possible to do that in pure VB (maybe with API).. You can maybe use this?
Code:
Option Explicit
Dim i As Integer
Private Sub Form_Load()
For i = 1 To 20
List1.AddItem i
List2.AddItem i
List3.AddItem i
Next
End Sub
Private Sub List1_Click()
i = List1.ListIndex
List2.ListIndex = i
List3.ListIndex = i
End Sub
Private Sub List2_Click()
i = List2.ListIndex
List1.ListIndex = i
List3.ListIndex = i
End Sub
Private Sub List3_Click()
i = List3.ListIndex
List1.ListIndex = i
List2.ListIndex = i
End Sub
but If I was you I should use ListView that you finds is Microsoft Common Controls 6.0
and set the property View to lvwReport. It looks just like Explorer's filelist
------------------
Best Regards rancor
[email protected]
http://www.sajberhem.nu
-
Jan 26th, 2000, 12:41 PM
#3
It's actually pretty easy to do. Here is an example where the ListBoxes are members of a control array, but you can adapt this for seperate TextBoxes as well.
Code:
Private Sub List1_Scroll(Index As Integer)
Select Case Index
Case 0
List1(1).TopIndex = List1(0).TopIndex
List1(2).TopIndex = List1(0).TopIndex
Case 1
List1(0).TopIndex = List1(1).TopIndex
List1(2).TopIndex = List1(1).TopIndex
Case 2
List1(0).TopIndex = List1(2).TopIndex
List1(1).TopIndex = List1(2).TopIndex
End Select
End Sub
------------------
Marty
Why is it called lipstick if you can still move your lips?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|