Textbox and focus

  • Thread starter Thread starter Anders Johansson
  • Start date Start date
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
 
Back
Top