c# MouseUp is ignored while dragging an item to another panel
I try开发者_开发百科 to drag an item from an ItemList to my TreeList. For that I wrote listView1_MouseDown, listView1_MouseMove, treeView1_MouseMove and treeView1_MouseUp functions. When I move the mouse within treeView1 borders, MouseMove event is handled as it was supposed to. But MouseUp doesn't fire. Am I doing something wrong? Talking about Winfroms.
As far as I remember, MouseUp
event is sent to the same control as MouseDown
was sent to. So, in your case, your listView1
will receive MouseUp
.
You might want to look into some other events, like DragDrop.
精彩评论