You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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: