Reputation: 143
I need to change focus to a ComboBox in my Windows Form on an event (say SelectedIndexChange event of another ComboBox). How do I achieve this?
Upvotes: 0
Views: 2994
Reputation: 3125
You should be able to use the .Focus()
of the control you want to give focus to.
private void comboBox2_SelectedIndexChanged(object sender, EventArgs e)
{
comboBox1.Focus();
}
Upvotes: 3