-
-
Notifications
You must be signed in to change notification settings - Fork 355
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I cannot get the combo box list. #609
Comments
Try selecting using Id |
Are there any items in |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Tried comboBox.Select
Extensions SelectItem - Using the Patter IExpandCollapsePattern
Extension ChooseItem - This worked fabulously before I was laid off last Xmas. Now I have been rehired, but the combo box on an old vb form is no longer working.
Code snippets
//loginForm.LoginTo.Select(loginInformation.LoginTo);
//loginForm.LoginTo.SelectItem(loginInformation.LoginTo)
loginForm.LoginTo.ChooseItem(loginInformation.LoginTo);
loginForm.LoginButton.Invoke();
public static void ChooseItem(this ComboBox comboBox, string selection)
{
comboBox.Focus();
ComboBoxItem[] comboBoxItems = comboBox.Items;
foreach (ComboBoxItem item in comboBoxItems)
{
if (item.Text == selection)
{
if (comboBox.ExpandCollapseState != ExpandCollapseState.Expanded) comboBox.Expand();
item.Select();
if (comboBox.ExpandCollapseState == ExpandCollapseState.Expanded) comboBox.Collapse();
return;
}
}
}
Screenshots
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: