Author: pbartok
Date: 2006-03-12 21:21:10 -0500 (Sun, 12 Mar 2006)
New Revision: 57887

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/RichTextBox.cs
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs
Log:
2006-03-12  Peter Dennis Bartok  <[EMAIL PROTECTED]>

        * RichTextBox.cs: Need to scroll to caret after text is inserted 
(#77672)
        * TextBoxBase.cs:
          - Scroll to caret after inserting text (#77672)
          - Make scroll range one pixel higher, fixes off-by-one error (and
            makes underlines visible on the last line)



Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2006-03-13 00:36:01 UTC (rev 57886)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2006-03-13 02:21:10 UTC (rev 57887)
@@ -1,3 +1,11 @@
+2006-03-12  Peter Dennis Bartok  <[EMAIL PROTECTED]>
+
+       * RichTextBox.cs: Need to scroll to caret after text is inserted 
(#77672)
+       * TextBoxBase.cs:
+         - Scroll to caret after inserting text (#77672)
+         - Make scroll range one pixel higher, fixes off-by-one error (and
+           makes underlines visible on the last line)
+
 2006-03-12  Peter Dennis Bartok  <[EMAIL PROTECTED]> 
 
        * XplatUIX11.cs: Added call to new Keyboard.ResetKeyState to prevent

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/RichTextBox.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/RichTextBox.cs   
2006-03-13 00:36:01 UTC (rev 57886)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/RichTextBox.cs   
2006-03-13 02:21:10 UTC (rev 57887)
@@ -325,7 +325,7 @@
                                document.SetSelection(line, sel_start);
                                document.PositionCaret(line, sel_start);
                                document.DisplayCaret();
-
+                               ScrollToCaret();
                                OnTextChanged(EventArgs.Empty);
                        }
                }

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs   
2006-03-13 00:36:01 UTC (rev 57886)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs   
2006-03-13 02:21:10 UTC (rev 57887)
@@ -17,7 +17,7 @@
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
-// Copyright (c) 2004-2005 Novell, Inc. (http://www.novell.com)
+// Copyright (c) 2004-2006 Novell, Inc. (http://www.novell.com)
 //
 // Authors:
 //     Peter Bartok    [EMAIL PROTECTED]
@@ -397,6 +397,7 @@
                        set {
                                if (!read_only) {
                                        
document.ReplaceSelection(CaseAdjust(value));
+                                       ScrollToCaret();
                                        OnTextChanged(EventArgs.Empty);
                                }
                        }
@@ -1459,7 +1460,7 @@
                        if (document.Height >= ClientSize.Height) {
                                vscroll.Enabled = true;
                                vscroll.Minimum = 0;
-                               vscroll.Maximum = document.Height - 
ClientSize.Height;
+                               vscroll.Maximum = document.Height - 
ClientSize.Height + 1;
                        } else {
                                vscroll.Maximum = document.ViewPortHeight;
                                vscroll.Enabled = false;
@@ -1602,7 +1603,7 @@
                        }
 
                        // Handle vertical scrolling
-                       height = document.CaretLine.Height;
+                       height = document.CaretLine.Height + 1;
 
                        if (pos.Y < document.ViewPortY) {
                                vscroll.Value = pos.Y;

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to