WinForms

WinForms

WinForms bug: NodeMouseDoubleClick event in TreeView will sometimes have the wrong node in EventArgs

Here's a strange bug I've encountered today in a WinForms application. Usually, double clicking on a collapsed tree node (which obviously has child nodes) will expand it. Most of the time when we need something to happen when a child node is double clicked, but not the parent, we write something similar to: 1: void NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e) 2: { 3: if (e.Node.Nodes.Count == 0) 4: ...

«March»
SunMonTueWedThuFriSat
28123456
78910111213
14151617181920
21222324252627
28293031123
45678910