Просмотр исходного кода

2006-01-12 Peter Dennis Bartok <[email protected]>

	* Control.cs: Undid my selection check fix, since it's not needed
	* TextBoxBase.cs:
	  - Now considering the presence of hscroll/vscroll when sizing
	    vscroll/hscroll respectively. Fixed bug #77077
	  - Added Left/Up/Down/Right to IsInputKey list to prevent
	    ContainerControl from stealing them. This fixes what I broke
	    with my last checkin.


svn path=/trunk/mcs/; revision=55491
Peter Dennis Bartok 20 лет назад
Родитель
Сommit
2fd9aa1c15

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

@@ -1,3 +1,13 @@
+2006-01-12  Peter Dennis Bartok  <[email protected]>
+
+	* Control.cs: Undid my selection check fix, since it's not needed
+	* TextBoxBase.cs:
+	  - Now considering the presence of hscroll/vscroll when sizing
+	    vscroll/hscroll respectively. Fixed bug #77077
+	  - Added Left/Up/Down/Right to IsInputKey list to prevent
+	    ContainerControl from stealing them. This fixes what I broke
+	    with my last checkin.
+
 2006-01-12  Peter Dennis Bartok  <[email protected]> 
 
 	* ScrollableControl.cs: Implemented dockpadding. Fixes #77166. And

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

@@ -2950,7 +2950,7 @@ namespace System.Windows.Forms
 					break;
 				}
 
-				if (c.CanSelect && (c != ctl) && ((c.parent == ctl.parent) || nested) && (c.tab_stop || !tabStopOnly)) {
+				if (c.CanSelect && ((c.parent == ctl.parent) || nested) && (c.tab_stop || !tabStopOnly)) {
 					Select(c);
 					return true;
 				}

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

@@ -671,13 +671,16 @@ namespace System.Windows.Forms {
 					return false;
 				}
 
+				case Keys.Left:
+				case Keys.Right:
+				case Keys.Up:
+				case Keys.Down:
 				case Keys.PageUp:
 				case Keys.PageDown:
 				case Keys.Home:
 				case Keys.End: {
 					return true;
 				}
-
 			}
 			return false;
 		}
@@ -1369,8 +1372,8 @@ namespace System.Windows.Forms {
 			canvas_height = ClientSize.Height;
 
 			// We always move them, they just might not be displayed
-			hscroll.Bounds = new Rectangle (ClientRectangle.Left, ClientRectangle.Bottom - hscroll.Height, ClientSize.Width, hscroll.Height);
-			vscroll.Bounds = new Rectangle (ClientRectangle.Right - vscroll.Width, ClientRectangle.Top, vscroll.Width, ClientSize.Height);
+			hscroll.Bounds = new Rectangle (ClientRectangle.Left, ClientRectangle.Bottom - hscroll.Height, ClientSize.Width - (vscroll.Visible ? SystemInformation.VerticalScrollBarWidth : 0), hscroll.Height);
+			vscroll.Bounds = new Rectangle (ClientRectangle.Right - vscroll.Width, ClientRectangle.Top, vscroll.Width, ClientSize.Height - (hscroll.Visible ? SystemInformation.HorizontalScrollBarHeight : 0));
 			
 		}
 
@@ -1462,6 +1465,8 @@ namespace System.Windows.Forms {
 				hscroll.Maximum += vscroll.Width * 2;
 				canvas_width = ClientSize.Width - vscroll.Width * 2;
 			}
+
+			TextBoxBase_SizeChanged(this, EventArgs.Empty);
 		}
 
 		private void document_WidthChanged(object sender, EventArgs e) {