Reputation: 2429
I need to set focus to a textedit on Button Click event ? in my Form
i tried this one but not working TXE_FlatDiscountP.Focus();
How to set focus on event ?
Upvotes: 0
Views: 1468
Reputation: 36
Your way is correct. Maybe you are missing something.To be more detailed here is an example:
private void button1_Click(object sender, EventArgs e)
{
textBox1.Focus();
}
This is an example of setting focus to a textbox.
Upvotes: 1