[Mono-bugs] [Bug 79489][Nor] New - System caret in a TextBox isn't set properly

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon Sep 25 10:36:13 EDT 2006


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 kuba.brecka at gmail.com.

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

--- shadow/79489	2006-09-25 10:36:13.000000000 -0400
+++ shadow/79489.tmp.567	2006-09-25 10:36:13.000000000 -0400
@@ -0,0 +1,58 @@
+Bug#: 79489
+Product: Mono: Class Libraries
+Version: 1.1
+OS: 
+OS Details: Windows XP SP1
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Windows.Forms
+AssignedTo: toshok at ximian.com                            
+ReportedBy: kuba.brecka at gmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: System caret in a TextBox isn't set properly
+
+Tested on Windows XP SP1 using Mono 1.1.17.1 (I would have tested using
+SVN, but there seems to be some problem with the daily build downloads).
+
+Actual results:
+When you run the following reproduce code, notice where the system caret is
+(at the beginning of the text field, like SelectionStart was set to 0). Now
+hit the left or right arrow key and the caret moves to the 7th position.
+
+Expected results:
+When the program is run, the caret should be on the 7th position, then if
+you press left or right arrow, it should move to the 6th or 8th position.
+
+Reproduce code:
+
+using System;
+using System.Windows.Forms;
+
+namespace MonoTest23
+{
+    public class Form1 : Form
+    {
+        static void Main()
+        {
+            Application.Run(new Form1());
+        }
+
+        public Form1()
+        {
+            TextBox T = new TextBox();
+            T.Font = new
+System.Drawing.Font(System.Drawing.FontFamily.GenericSerif, 20);
+            T.Width = 200;
+            T.Text = "abcdefghijkl";
+            T.SelectionLength = 0;
+            T.SelectionStart = 7;
+
+            Controls.Add(T);
+        }
+    }
+}


More information about the mono-bugs mailing list