|
-
Sep 27th, 2001, 01:37 PM
#1
Thread Starter
Fanatic Member
ListBox ** Resolved **
I have a form that has two list boxes. One form contains a list of servers while the other contains a list of services. When they are populated the data syncs up like:
Server Service
Serv-01 IIS Admin
Serv-01 MSSQLServer
Serv-02 Logical Disk Manager
Serv-02 IIS Admin
I want to make it so that when scroll down in one list box, the other scrolls down as well. That way my server and service stay linked up. Is this possible?
Chris
Last edited by vb_dba; Sep 27th, 2001 at 02:06 PM.
Chris
Master Of My Domain
Got A Question? Look Here First
-
Sep 27th, 2001, 01:50 PM
#2
Hyperactive Member
Try this:
VB Code:
Private Sub List1_Click()
List2.ListIndex = List1.ListIndex
End Sub
-
Sep 27th, 2001, 01:55 PM
#3
Frenzied Member
or when you're scrolling do this:
list2.listindex = list1.topindex
-
Sep 27th, 2001, 01:56 PM
#4
Thread Starter
Fanatic Member
That works okay, but I want both list boxes to scroll when I click the scroll bar on either.
I just found where you can make a list box have multiple columns. How do I add values to those columns? This might be a simpler solution to what I'm looking for.
Chris
Master Of My Domain
Got A Question? Look Here First
-
Sep 27th, 2001, 01:57 PM
#5
Why don't you load both of your columns into a ListView control instead of a Listbox. That would give you a lot functionality.
-
Sep 27th, 2001, 02:06 PM
#6
Thread Starter
Fanatic Member
I modified vbgladiators suggestion to read list2.TopIndex = list1.TopIndex and it works perfect. Thanks to all for all of your responses.
Chris
Chris
Master Of My Domain
Got A Question? Look Here First
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
|