Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Drag and Drop

$
0
0
Hi,

I have 2 custom controls, one is a task, the other is a person. Both are just user controls with a text box in. This is for the time being.

I want to be able to drag a task onto a person, to allocate the task to them.

This is what i have so far.

        
private void task_v11_MouseDown(object sender, MouseEventArgs e)
        {
            blnDragging = true;
            Task_v1 c = sender as Task_v1;
            lngDraggingTask = c.TASK_ID;
        }



This gets the task id from the task being dragged, but i cant seem to get the drop bit to work.

I have in the drop

        private void team_Member_v11_DragDrop(object sender, DragEventArgs e)
        {
            e.Effect = DragDropEffects.All;
        }



but when i put a break point in here, and drag my task on to it, it is not met. But if i drag a file from my desktop to it, it is fired. When i hold down my right mousebutton and try to drag the task, there is no mouse pointer change or anything indicating there is something to drop.

Thanks

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>