Here is an example to find the value in ListBox according to the text of Text box.
means when you type any character or word in textbox the matched value will be select in list box-
this 4 lines of code will remove your all headache to apply the incremental search option on listbox-
on TextBox's TextChangedEvent code like this-
private void textBox1_TextChanged(object sender, EventArgs e)
{
int index = listBox1.FindString(this.textBox1.Text);
if (0 <= index)
{
listBox1.SelectedIndex = index;
}
}
Showing posts with label ListBox. Show all posts
Showing posts with label ListBox. Show all posts
Monday, June 14, 2010
Subscribe to:
Posts (Atom)
