Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
 
 
 
500MB 27GB Web Hosting - $9.95/Month
 
 
 
 
 
Old Pages
 
Old Index
Site Map
What's New
 
Books
How To
Tips & Tricks
Tutorials
Stories
Performance
Essays
Links
Q & A
New in VB6
Free Stuff
Pictures
 
 
 
TitleMake two lists pick corresponding selections in VB .NET
Keywords.NET, VB.NET, ListBox, select, pick, corresponding
CategoriesVB.NET, Controls
 
Set the SelectedIndex property of the each list when the other's changes.
 
Private Sub ListBox1_SelectedIndexChanged(ByVal sender As _
    System.Object, ByVal e As System.EventArgs) Handles _
    ListBox1.SelectedIndexChanged
    ListBox2.SelectedIndex = ListBox1.SelectedIndex
End Sub

Private Sub ListBox2_SelectedIndexChanged(ByVal sender As _
    System.Object, ByVal e As System.EventArgs) Handles _
    ListBox2.SelectedIndexChanged
    ListBox1.SelectedIndex = ListBox2.SelectedIndex
End Sub
 
 
Copyright © 1997-2003 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated