فهرست منبع

* TextBoxBase.cs: Take HideSelection into account when
* determining
whether or not to show the selection.
* RichTextBox.cs: After inserting the RTF into the document move
the cursor to the beginning of the document.


svn path=/trunk/mcs/; revision=69203

Jackson Harper 19 سال پیش
والد
کامیت
2d3ee79bc1

+ 7 - 0
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog

@@ -1,3 +1,10 @@
+2006-12-07  Jackson Harper  <[email protected]>
+
+	* TextBoxBase.cs: Take HideSelection into account when determining
+	whether or not to show the selection.
+	* RichTextBox.cs: After inserting the RTF into the document move
+	the cursor to the beginning of the document.
+
 2006-12-07  Jonathan Pobst  <[email protected]>
 
 	* Control.cs: Remove static ArrayList "controls" which maintained

+ 4 - 0
mcs/class/Managed.Windows.Forms/System.Windows.Forms/RichTextBox.cs

@@ -873,6 +873,10 @@ namespace System.Windows.Forms {
 			}
 
 			InsertRTFFromStream(data, 0, 1);
+
+			document.PositionCaret (document.GetLine (1), 0);
+			document.SetSelectionToCaret (true);
+			ScrollToCaret ();
 		}
 
 		[MonoTODO("Make smarter RTF detection?")]

+ 1 - 1
mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs

@@ -1374,7 +1374,7 @@ namespace System.Windows.Forms {
 
 		internal bool ShowSelection {
 			get {
-				if (show_selection) {
+				if (show_selection || !hide_selection) {
 					return true;
 				}