|
-
May 31st, 2002, 02:43 PM
#1
Thread Starter
Member
Some help getting my project off the ground.
Hi all, thanks for reading 
Ok here is what im trying to do. I have an access database with a list of people.
I want to put the list of people into a treeview on the left side of the screen. Then add people from that treeview, to a second treeview on the right side of the screen. The individuals on the treeview need to be able to be moved backwards and forwards.
Im looking for some input on theory behind this I have been trying for a while to figure it out, but its not coming to me 
I am using vb.net.
Thankyou much,
Darren
-
May 31st, 2002, 03:38 PM
#2
hello, don't know if this will help you, but I wrote some code to do this with listboxes. To use this code, put two listboxes on a form, with 4 buttons.
VB Code:
Private Sub cmdAdd_Click()
'Adds the selected file types to the selected listbox.
Dim intCount As Integer
If lstTypes.ListCount > 0 Then
For intCount = (lstTypes.ListCount - 1) To 0 Step -1
If lstTypes.Selected(intCount) Then
lstSelected.AddItem lstTypes.List(intCount)
lstTypes.RemoveItem (intCount)
End If
Next
End If
End Sub
Private Sub cmdAddAll_Click()
'Adds all file types to the selected listbox.
Dim intCount As Integer
If lstTypes.ListCount > 0 Then
For intCount = (lstTypes.ListCount - 1) To 0 Step -1
lstSelected.AddItem lstTypes.List(intCount)
lstTypes.RemoveItem (intCount)
Next
End If
End Sub
Private Sub cmdRemove_Click()
'Removes the selected file types from the selected listbox.
Dim intCount As Integer
If lstSelected.ListCount > 0 Then
For intCount = (lstSelected.ListCount - 1) To 0 Step -1
If lstSelected.Selected(intCount) Then
lstTypes.AddItem lstSelected.List(intCount)
lstSelected.RemoveItem (intCount)
End If
Next
End If
End Sub
Private Sub cmdRemoveAll_Click()
'Removes all file types from the selected listbox.
Dim intCount As Integer
If lstSelected.ListCount > 0 Then
For intCount = (lstSelected.ListCount - 1) To 0 Step -1
lstTypes.AddItem lstSelected.List(intCount)
lstSelected.RemoveItem (intCount)
Next
End If
End Sub
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
|