TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Charles Morissette
NA
29
42.9k
Combobox List Select
May 6 2011 8:30 PM
I have a combo box I have loaded with a few items. What I am trying to do is make it so when someone puts text in, it will look for that partial text in the combobox and select that item in the drop down menu.
My code is
[CODE]
private void itemPicker_TextChanged(object sender, EventArgs e)
{
string Find = string.Empty;
itemPicker.SelectedItem = itemPicker.FindString(itemPicker.Text);
}
[/CODE]
It works if the text is at the start - (EX : I type Star W, it will go over Star Gate and Star Trek and select Star Wars). But if I type in Wa, it will not select Star Wars, which is what I would like it to do. Any tips on what to use to build a search myself (I'm thinking of going with a "for"/"for each" loop to go through all the items, but don't what command displays the item index on the drop down menu) or a command I don't know about would be appreciated.
Reply
Answers (
1
)
how to hide my computer drive in application
Passing Data between forms