RE: Drag a tree view node on to a richedit by StealthyMark
StealthyMark
Mon Apr 04 08:11:02 CDT 2005
That's simple.
// the handler for the Treeview.ItemDrag event
private void treeview_ItemDrag(object sender,
ItemDragEventArgs e)
{
// create the text you want to drop here
string text = CreateYourTextNow(treeview.SelectedNode);
// perform the drag-drop
DoDragDrop(text, DragDropEffects.Copy);
}
Note: For your RichTextBox, you may have to set AllowDrop to true.
Mark Rockmann
"Jeremy Chapman" wrote:
> I want to be able to drag a treeview node, drop it on to a rich edit box and
> when that event occures, insert some text into the rich edit at the location
> that the node was dropped.
>
> Possible? Any hints on how to do this, as I'm not sure where to start.
>
>
>