-
May 16th, 2011, 03:50 AM
#1
Thread Starter
New Member
Moving lines between lists
Hey All,
Does anybody know how I would be able to move a line from one list box to another?
What I need to do is read a text file, populate the lines in list boxes (automatically sorting them by set groups, defined in the text file).
Then I want to move the names between the boxes to my desire, the hit save and it will write them all back into the same text file.
Whats the best way to do this, and how would be much appreciated.
Thanks in advance!
-
May 16th, 2011, 05:18 AM
#2
Re: Moving lines between lists
You haven't given enough detail about sorting part but, as far as the moving is concerned, you get the SelectedItem of one ListBox, Add it to the Items collection of the second and then Remove it from the Items collection of the first.
-
May 16th, 2011, 05:22 AM
#3
Thread Starter
New Member
Re: Moving lines between lists
I can manage the sorting part fine, it's the 'SelectedItem' area I need to look into, I'll have a hunt around on how to use this but this is sending me in the right track.
Cheers.
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
|