* TextBoxBase.cs: Take HideSelection into account when
authorJackson Harper <jackson@novell.com>
Thu, 7 Dec 2006 21:12:13 +0000 (21:12 -0000)
committerJackson Harper <jackson@novell.com>
Thu, 7 Dec 2006 21:12:13 +0000 (21:12 -0000)
        * 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

mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
mcs/class/Managed.Windows.Forms/System.Windows.Forms/RichTextBox.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs

index 4275d810c74e8fb4b52c4c9a4ed355bd42e022cd..9bcf0a59e649f05837b50b8c47485360c8090be1 100644 (file)
@@ -1,3 +1,10 @@
+2006-12-07  Jackson Harper  <jackson@ximian.com>
+
+       * 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  <monkey@jpobst.com>
 
        * Control.cs: Remove static ArrayList "controls" which maintained
index 75c3a47c6edac7267760c4e86509e54f69d5c26f..0c13bf0aab9bc07bb1fa278484749435e35f5a6b 100644 (file)
@@ -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?")]
index e7926629147b31d11cf519f43c054ef050e3781b..2f87b302af463c43585d5d4ac726d45fc429a3ae 100644 (file)
@@ -1374,7 +1374,7 @@ namespace System.Windows.Forms {
 
                internal bool ShowSelection {
                        get {
-                               if (show_selection) {
+                               if (show_selection || !hide_selection) {
                                        return true;
                                }