Index: TextBoxBase.cs
===================================================================
--- TextBoxBase.cs	(Revision 76713)
+++ TextBoxBase.cs	(Arbeitskopie)
@@ -769,6 +769,40 @@
 		public void Undo() {
 			document.undo.Undo();
 		}
+		public virtual char GetCharFromPosition(Point p)
+		{
+			if(p.X<0&&p.Y<0)
+				p = new Point(0,0);
+			Line line = document.GetLineByPixel(p.Y,false);
+			
+			//Console.WriteLine(p+ "   " +line.Text);
+			if(p.X==0)
+				return line.Text[0];
+			int index=0;
+			if(p.X<=line.tags.start)
+				p.X = line.tags.start+1;
+			//Console.WriteLine(line.tags.start);
+			LineTag tag = document.FindTag(p.X,p.Y,out index,false);
+			if(tag==null)
+				return line.Text[0];
+			//Console.WriteLine(tag + "   " + index);
+			return tag.Text()[index-1];
+			
+			string text = line.Text;
+			Graphics g = CreateGraphics();
+			//Console.WriteLine("\n" + line.Text + "  " + p + "   " +document.viewport_x + "  " + this.Font);
+			for(int i =0; i< text.Length;i++)
+			{
+				SizeF size = g.MeasureString(text.Substring(0,i),this.Font);
+				size.Width +=document.viewport_x;
+				//Console.WriteLine(text.Substring(0,i) + "   " +size.Width);
+	             if(size.Width>p.X)
+	             {
+	             	return text[i-1];
+	             }
+			}
+			return line.Text[line.Text.Length-1];
+		}
 		#endregion	// Public Instance Methods
 
 		#region Protected Instance Methods
@@ -1334,7 +1368,7 @@
 				return;
 			}
 		}
-
+		
 		#endregion	// Protected Instance Methods
 
 		#region Events
=