Use this for your ComboBox's KeyPress event:
protected void ComboBox_KeyPress(object sender, System.Windows.Forms.KeyPr
{
ComboBox comboBox = (ComboBox)sender;
if(Char.IsControl(e.KeyCha
return;
string ToFind = comboBox.Text.Substring(0,
int Index = comboBox.FindStringExact(T
if(Index==-1)
Index = comboBox.FindString(ToFind
if(Index==-1)
return;
comboBox.SelectedIndex = Index;
comboBox.SelectionStart = ToFind.Length;
comboBox.SelectionLength = comboBox.Text.Length - comboBox.SelectionStart;
e.Handled = true;
}
Main Topics
Browse All Topics





by: pcarrierPosted on 2005-07-13 at 15:11:39ID: 14436234
Check
/vb/net/au tocomplete _combobox. asp
http://www.codeproject.com