Posted 21 years ago
by painetraine
I am trying to implement drag/drop of files into the editor but when I handle the DragEnter and check for
(drgevent.Data.GetDataPresent(DataFormats.FileDrop)), it finds it to be true and I set Effect = DragDropEffects.Copy but the copy cursor never shows and I am never able to drop a file or anything else onto the editor control.
Is there any way to do this?
Here is my DragEnter code:
protected override void OnDragEnter(DragEventArgs drgevent)
{
if (drgevent.Data.GetDataPresent(DataFormats.FileDrop))
{
drgevent.Effect = DragDropEffects.Copy;
}
else
base.OnDragEnter (drgevent);
}
I inheirt the SyntaxEditor into my own control and I have tried handling it in the inherited control as well as the event on the form and it still never shows a copy cursor even though the effect is set to Copy.
Any ideas???
Thanks
(drgevent.Data.GetDataPresent(DataFormats.FileDrop)), it finds it to be true and I set Effect = DragDropEffects.Copy but the copy cursor never shows and I am never able to drop a file or anything else onto the editor control.
Is there any way to do this?
Here is my DragEnter code:
protected override void OnDragEnter(DragEventArgs drgevent)
{
if (drgevent.Data.GetDataPresent(DataFormats.FileDrop))
{
drgevent.Effect = DragDropEffects.Copy;
}
else
base.OnDragEnter (drgevent);
}
I inheirt the SyntaxEditor into my own control and I have tried handling it in the inherited control as well as the event on the form and it still never shows a copy cursor even though the effect is set to Copy.
Any ideas???
Thanks