Textbox and focus

A

Anders Johansson

Hi!

I´m using a form with a tabControl.
Each tab contains of a couple of textboxes.

When I change tab I also whant to set focus to a textbox.

Sounds simple.... but the textbox doesn't focus.

private void tabControl1_SelectedIndexChanged(object sender,
System.EventArgs e)
{

if (tabControl1.SelectedIndex == tabControl1.TabPages.IndexOf(Flik1))
{
F1Name.Focus();
}
}

I'm using CF SP2.

Anyone that can explain this strange behaviour?

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top