Author: jpobst
Date: 2008-02-20 17:52:17 -0500 (Wed, 20 Feb 2008)
New Revision: 96320
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TreeView.cs
Log:
2008-02-20 Jonathan Pobst <[EMAIL PROTECTED]>
* TreeView.cs: StateImages are basically custom checkboxes, so
factor their size the same as real checkboxes when determining
what got clicked.
[Fixes bug #363360]
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2008-02-20 22:21:43 UTC (rev 96319)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2008-02-20 22:52:17 UTC (rev 96320)
@@ -1,5 +1,12 @@
2008-02-20 Jonathan Pobst <[EMAIL PROTECTED]>
+ * TreeView.cs: StateImages are basically custom checkboxes, so
+ factor their size the same as real checkboxes when determining
+ what got clicked.
+ [Fixes bug #363360]
+
+2008-02-20 Jonathan Pobst <[EMAIL PROTECTED]>
+
* MessageBox.cs: Make the message box wider if the form caption
is longer than the text in the form.
[Fixes bug #361137]
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TreeView.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TreeView.cs
2008-02-20 22:21:43 UTC (rev 96319)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TreeView.cs
2008-02-20 22:52:17 UTC (rev 96320)
@@ -1286,6 +1286,11 @@
l -= ImageList.ImageSize.Width + 3;
if (checkboxes)
l -= 19;
+#if NET_2_0
+ // StateImage is basically a custom checkbox
+ else if (node.StateImage != null)
+ l -= 19;
+#endif
return (x > l && x < l + 8);
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches