[Mono-bugs] [Bug 76681][Nor] New - TreeView scrollup loses focus on its node

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sat Nov 12 08:04:36 EST 2005


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by atsushi at ximian.com.

http://bugzilla.ximian.com/show_bug.cgi?id=76681

--- shadow/76681	2005-11-12 08:04:35.000000000 -0500
+++ shadow/76681.tmp.29451	2005-11-12 08:04:35.000000000 -0500
@@ -0,0 +1,102 @@
+Bug#: 76681
+Product: Mono: Class Libraries
+Version: 1.1
+OS: 
+OS Details: SUSE 10
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Windows.Forms
+AssignedTo: peter at novonyx.com                            
+ReportedBy: atsushi at ximian.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: TreeView scrollup loses focus on its node
+
+TreeView scrollup loses focus on its node.
+
+using System;
+using System.Windows.Forms;
+
+public class TestForm : Form
+{
+        public static void Main ()
+        {
+                Application.Run (new TestForm ());
+        }
+
+        public TestForm ()
+        {
+                TreeView tv = new TreeView ();
+                for (int i = 0; i < 50; i++)
+                        tv.Nodes.Add (new TreeNode ("node" + i));
+                Controls.Add (tv);
+        }
+}
+
+Steps to reproduce the problem:
+1. build and run blah.exe.
+2. select a node in the treeview and move down until some nodes go hidden.
+3. scroll up until the treeview scrolls up.
+
+Actual Results:
+
+The focus goes away. I guess, the focus remains on the internal scrollbar
+(since it can still move up/down) and/or fails to find the exact target
+node to focus.
+
+Expected Results:
+
+The focus does not go away.
+
+How often does this happen? 
+
+consistently.
+
+Additional Information:
+
+I think it is a side effect of this bug, but once the focus got lost, you
+can still scroll down with the cursor key (not the page down key here), and
+when the TreeView gets out from the form (I guess, the parent container),
+it throws ArgumentException:
+
+
+Unhandled Exception: System.ArgumentException: '51' is not a valid value
+for 'Value'. 'Value' should be between 'Minimum' and 'Maximum'
+in <0x00134> System.Windows.Forms.ScrollBar:set_Value (Int32 value)
+in (wrapper remoting-invoke-with-check)
+System.Windows.Forms.ScrollBar:set_Value (int)
+in <0x0006d> System.Windows.Forms.TreeView:SetTop
+(System.Windows.Forms.TreeNode node)
+in (wrapper remoting-invoke-with-check)
+System.Windows.Forms.TreeView:SetTop (System.Windows.Forms.TreeNode)
+in <0x00072> System.Windows.Forms.TreeNode:EnsureVisible ()
+in (wrapper remoting-invoke-with-check)
+System.Windows.Forms.TreeNode:EnsureVisible ()
+in <0x00382> System.Windows.Forms.TreeView:set_SelectedNode
+(System.Windows.Forms.TreeNode value)
+in <0x0035c> System.Windows.Forms.TreeView:OnKeyDown
+(System.Windows.Forms.KeyEventArgs e)
+in <0x00091> System.Windows.Forms.Control:ProcessKeyEventArgs
+(System.Windows.Forms.Message msg)
+in <0x010a8> System.Windows.Forms.Control:WndProc
+(System.Windows.Forms.Message m)
+in <0x000ef> System.Windows.Forms.TreeView:WndProc
+(System.Windows.Forms.Message m)
+in <0x00014> System.Windows.Forms.Control+ControlNativeWindow:WndProc
+(System.Windows.Forms.Message m)
+in <0x0011e> System.Windows.Forms.NativeWindow:WndProc (IntPtr hWnd, Msg
+msg, IntPtr wParam, IntPtr lParam)
+in <0x00016> System.Windows.Forms.XplatUIX11:DispatchMessage
+(System.Windows.Forms.MSG msg)
+in <0x00015> System.Windows.Forms.XplatUI:DispatchMessage
+(System.Windows.Forms.MSG msg)
+in <0x00222> System.Windows.Forms.Application:Run ()
+in <0x000a4> System.Windows.Forms.Application:Run
+(System.Windows.Forms.ApplicationContext context)
+in <0x0002e> System.Windows.Forms.Application:Run
+(System.Windows.Forms.Form mainForm)
+in <0x0001f> TestForm:Main ()


More information about the mono-bugs mailing list