SIL.FieldWorks.Common.Widgets.FwComboBox.m_button_KeyPress C# (CSharp) Метод

m_button_KeyPress() приватный Метод

Handle a key press in the combo box. If it is a dropdown list use typing to try to make a selection (cf. LT-2190).
private m_button_KeyPress ( object sender, KeyPressEventArgs e ) : void
sender object
e System.Windows.Forms.KeyPressEventArgs
Результат void
		private void m_button_KeyPress(object sender, KeyPressEventArgs e)
		{
			// These have important meanings we don't want to suppress by saying we handled it.
			if (e.KeyChar == '\t' || e.KeyChar == '\r' || e.KeyChar == (char)Win32.VirtualKeycodes.VK_ESCAPE)
				return;
			if (DropDownStyle == ComboBoxStyle.DropDownList)
			{
				if (!Char.IsControl(e.KeyChar))
				{
					// We should drop the list down first, so that
					// ScrollHighlightIntoView() will execute.
					DroppedDown = true;
					ListBox.HighlightItemStartingWith(e.KeyChar.ToString());
				}
				e.Handled = true;
			}
		}