|
-
Mar 2nd, 2007, 01:59 AM
#1
Thread Starter
Lively Member
[RESOLVED] listbox problem....
what i want to do is, when i click on one of the item in list1, then list2 item will be selected also.
for example: if second item in list 1 is selected, then the second item in list2 will be selected also.....
but what i have done seem like got something wrong...
Code:
For a = 0 To list1.ListCount - 1
a = list1.ListIndex
List2.Selected(a) = true
Next
-
Mar 2nd, 2007, 02:09 AM
#2
Re: listbox problem....
Code:
Private Sub List1_Click()
List2.ListIndex = List1.ListIndex
End Sub
Or..
Code:
Private Sub List1_Click()
List2.Selected(List1.ListIndex) = True
End Sub
-
Mar 2nd, 2007, 02:11 AM
#3
Hyperactive Member
Re: listbox problem....
Try this out
Code:
Private Sub list1_Click()
list2.ListIndex= List1.ListIndex
End Sub
If the post is heplful, Please Rate it
Chathura Wijekoon
-
Mar 2nd, 2007, 02:14 AM
#4
Thread Starter
Lively Member
-
Mar 2nd, 2007, 02:17 AM
#5
Re: listbox problem....
Just in case: when using Multiselect = Simple then it's:
Code:
Private Sub List1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
List2.Selected(List1.ListIndex) = List1.Selected(List1.ListIndex)
End Sub
Last edited by jcis; Mar 2nd, 2007 at 02:21 AM.
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
|