how to add drag&drop to a panel ?

  • Thread starter Thread starter Taptu¶
  • Start date Start date
T

Taptu¶

Hi,

Is there any way to use D&D functionality with panel ?
Ex. I have 2 panels: panel 1 and panel2
I want to drag panel1 over panel2 and change parent value of panel1 after
Drop
panel1.parent = panel2;

Best regards
Taptu¶
 
Hi Taptu,

In a WinForms application you can use the drag and drop events.

Control.DragDrop event on MSDN:
http://windowssdk.msdn.microsoft.com/en-us/library/system.windows.forms.control.dragdrop.aspx

In a web application you'll have to use client-side scripting. I haven't
tried the code in the following article myself but there are plenty of other
resources on the web for this if it doesn't work for you:

ASP.NET Drag and Drop on The Code Project:
http://www.codeproject.com/aspnet/drag_drop.asp

IIRC there was an old IE behavior called dragdrop.htc, but I don't know if
it's still available/recommended. And it will only work in IE, AFAIK.
 
Back
Top