فهرست منبع

2005-12-24 Alexander Olk <[email protected]>

	* ComboBox.cs: The internal TextBox now returns the focus.


svn path=/trunk/mcs/; revision=54812
Alexander Olk 20 سال پیش
والد
کامیت
710b7700a0

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

@@ -1,3 +1,7 @@
+2005-12-24  Alexander Olk  <[email protected]>
+
+	* ComboBox.cs: The internal TextBox now returns the focus.
+
 2005-12-23  Jackson Harper  <[email protected]>
 
 	* ThemeWin32Classic.cs:  Draw the text for all tab appearances.

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

@@ -62,7 +62,6 @@ namespace System.Windows.Forms
 		private ComboListBox listbox_ctrl;		
 		private TextBox textbox_ctrl;
 		private bool process_textchanged_event;
-		private bool has_focus;	
 
 		[ComVisible(true)]
 		public class ChildAccessibleObject : AccessibleObject {
@@ -273,6 +272,8 @@ namespace System.Windows.Forms
 					textbox_ctrl.BorderStyle = BorderStyle.None;
 					textbox_ctrl.TextChanged += new EventHandler (OnTextChangedEdit);
 					textbox_ctrl.KeyPress += new KeyPressEventHandler(textbox_ctrl_KeyPress);
+					textbox_ctrl.GotFocus += new EventHandler(textbox_ctrl_GotFocus);
+					textbox_ctrl.LostFocus += new EventHandler(textbox_ctrl_LostFocus);
 
 					if (IsHandleCreated == true) {
 						Controls.AddImplicit (textbox_ctrl);
@@ -959,6 +960,16 @@ namespace System.Windows.Forms
 			OnKeyPress (e);
 		}
 		
+		private void textbox_ctrl_GotFocus(object sender, EventArgs e )
+		{
+			OnGotFocus(e);
+		}
+		
+		private void textbox_ctrl_LostFocus(object sender, EventArgs e )
+		{
+			OnLostFocus(e);
+		}
+		
 		// Calcs the text area size
 		internal void CalcTextArea ()
 		{