MatchWithList in Combo Box?
-
Hi All, In VB6's, Combobox has MatchWithList... My problem is, i cant find the counterpart or equivalent of MatchWithList in VB 2005's Combo Box.. Does anybody knows where can i find it? Please help and thanks in advance.... Widgets....
You're looking for the AutoCompleteMode and AutoCompleteSource properties.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007 -
You're looking for the AutoCompleteMode and AutoCompleteSource properties.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007 -
Thanks alot is working... Is there any property that will let me know if that AutoCompleteSource will nothing so suggest..? something like giving "true" if it suggested a string or "false" if it no suggested string?
Nope. You'd have to make your own version of the ComboBox to do that. Probably tracking how many characters the user actually typed against the length of the string in the Text property, maybe.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007 -
Nope. You'd have to make your own version of the ComboBox to do that. Probably tracking how many characters the user actually typed against the length of the string in the Text property, maybe.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007///Please use this function for MatchWithList
public static bool MatchWithList(ref ComboBox cmb, string cmbText)
{
bool matchexists = false;int i = cmb.FindStringExact(cmbText); if (i != -1) { cmb.SelectedIndex = i; matchexists = true; } else { matchexists = false; } return matchexists;
}
-
///Please use this function for MatchWithList
public static bool MatchWithList(ref ComboBox cmb, string cmbText)
{
bool matchexists = false;int i = cmb.FindStringExact(cmbText); if (i != -1) { cmb.SelectedIndex = i; matchexists = true; } else { matchexists = false; } return matchexists;
}
Yeah....ok. :~ And why are you replying to a 4 year old message??
A guide to posting questions on CodeProject[^]
Dave Kreskowiak