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
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.
Re: Treeview dragdrop to richtextbox
Quote:
Originally Posted by
tom1859
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