Results 1 to 3 of 3

Thread: Treeview dragdrop to richtextbox

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2009
    Posts
    77

    Treeview dragdrop to richtextbox

    Ok, ive been searching ages for this...

    Basicly i have to forms, one with a RTB on it, the other with a treeview on it

    I want to be able to drag a image from the treeview over to my rich text box.

    Basicly like a clip art window

    The treeview nodes have a short description of the image (e.g Dog) then a picture of a dog next to it. I want then to be able to drag that into my rich text box, and the picture of the dog to appear.

    Is there a easy way to do this?

    Thanks in advance
    Need any VB help/

    Just PM me!

  2. #2
    Fanatic Member Megalith's Avatar
    Join Date
    Oct 2006
    Location
    Secret location in the UK
    Posts
    879

    Re: Treeview dragdrop to richtextbox

    you would be best using a picturebox. where are you getting the original image that you wish to drag? is it a thumbnail from a directory? probably gonna need some code.
    If debugging is the process of removing bugs, then programming must be the process of putting them in.

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

    Re: Treeview dragdrop to richtextbox

    Quote Originally Posted by tom1859 View Post
    Is there a easy way to do this?
    Define "easy".

    Drag and drop is basically the same no matter what you're dragging. As such, any examples you can find are relevant. You handle the same events no matter what. All that changes is the data you pass in when you start dragging and how you process it when you drop it.

    So, you should start out with simple drag and drop examples, like dragging text between controls. Once you understand the principles, then you can apply them to something a little more complex. Follow the CodeBank link in my signature and check out my thread on drag and drop.

    http://www.google.com.au/search?q=dr...ient=firefox-a
    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

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