Results 1 to 5 of 5

Thread: [2005] Drag and drop within multiline textbox

  1. #1

    Thread Starter
    PowerPoster BruceG's Avatar
    Join Date
    May 2000
    Location
    New Jersey (USA)
    Posts
    2,657

    [2005] Drag and drop within multiline textbox

    Would it be possible to drag and drop lines (where each line represents an item) within a multiline textbox, to allow the user to rearrange the items? If so, some sample code would be much appreciated.

    Thanks,
    Bruce
    "It's cold gin time again ..."

    Check out my website here.

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

    Re: [2005] Drag and drop within multiline textbox

    I suggest you use a ListBox.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    PowerPoster BruceG's Avatar
    Join Date
    May 2000
    Location
    New Jersey (USA)
    Posts
    2,657

    Re: [2005] Drag and drop within multiline textbox

    I am aware of the listbox option. In this particular case, the direct entry of a textbox would be desirable. So, is the drag and drop possible, and if so, is it more trouble than its worth?
    "It's cold gin time again ..."

    Check out my website here.

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [2005] Drag and drop within multiline textbox

    Could you use a ListView with LabelEdit set to True? What you ask for would be possible with a TextBox but I'd guess it would be tedious. It would also be difficult to maintain the integrity of the data as the user could add line breaks wherever they felt like it.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  5. #5

    Thread Starter
    PowerPoster BruceG's Avatar
    Join Date
    May 2000
    Location
    New Jersey (USA)
    Posts
    2,657

    Re: [2005] Drag and drop within multiline textbox

    Actually, the ListView with LabelEdit is not a bad idea at all, hadn't thought about it. (I can do the D&D with the LV.) Thank you.
    "It's cold gin time again ..."

    Check out my website here.

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