Results 1 to 3 of 3

Thread: Moving lines between lists

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2011
    Posts
    4

    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!

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,301

    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.

  3. #3

    Thread Starter
    New Member
    Join Date
    May 2011
    Posts
    4

    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
  •  



Click Here to Expand Forum to Full Width