SIL.FieldWorks.Common.Widgets.TreeCombo.m_comboTextBox_KeyPress C# (CSharp) Method

m_comboTextBox_KeyPress() private method

Handle a key press in the combo box. Enable type-ahead to select list items (LT-2190).
private m_comboTextBox_KeyPress ( object sender, KeyPressEventArgs e ) : void
sender object
e System.Windows.Forms.KeyPressEventArgs
return void
		private void m_comboTextBox_KeyPress(object sender, KeyPressEventArgs e)
		{
			if (!Char.IsControl(e.KeyChar))
			{
				RaiseDropDown(); // Typically loads the list, which better be done before we try to select one.
				Tree.SelectNodeStartingWith(e.KeyChar.ToString());
				ShowDropDownBox();
				e.Handled = true;
			}
		}