|
-
Jan 3rd, 2010, 01:36 PM
#1
Thread Starter
New Member
Waiting List With Arrays & Listbox
Hello,
I am making a project (Waiting List) where I am using arraylist(2) therefor I am entering 3 pieces of information.
The information in the arraylist is then sent to a listbox
lstWaiting.Items.Add(String.Format("{0} To {1} = {2:c}", _
arraylist(0), _
arraylist(1), _
arraylist(2)))
Then when the item in the listbox is double clicked it removes the information from the listbox and sends it to textboxes
Do While lstWaiting.SelectedIndex > -1
lstWaiting.SelectedItem = lstWaiting.Items.Item(lstWaiting.Items.Count - 1)
lstWaiting.Items.RemoveAt(lstWaiting.SelectedIndex)
Loop
txtArrayPickUp.Text = arraylist(0)
WaitPickUp = txtArrayPickUp.Text
txtArrayDropOff.Text = arraylist(1)
WaitDropOff = txtArrayDropOff.Text
txtArrayPrice.Text = arraylist(2)
WaitPrice = txtArrayPrice.Text
Now I could empty and re use the array to add 3 more pieces of information however, what if I have to keep that first array loaded and left on the list but had to add more information into more separate arrays and once the first arraylist becomes used (deleted from listbox and entered into textbox) I can then reuse it. How could I code that? The redim would be useless because once I delete the item from the listbox the array will be deleted and reused.
Can anyone help me out please?
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
|