P
Paul Close
A new solution/project consisting of a single windows form with a tab
control, 3 tab pages and a text box on each tab page. I expected the
following to set focus to the text box on the selected tab page but it does
not.
Private Sub TabControl1_SelectedIndexChanged(...etc
Select Case TabControl1.SelectedIndex
Case 0
txtBox1.Focus()
Case 1
txtBox2.Focus()
Case 2
txtBox3.Focus()
End Select
End Sub
CanFocus is false for the tab page and the text box while in the sub.
TabControl1.SelectedTab = TabPage1 before txtBox1.Focus() doesn't help
either.
What am I missing?
Thanks
control, 3 tab pages and a text box on each tab page. I expected the
following to set focus to the text box on the selected tab page but it does
not.
Private Sub TabControl1_SelectedIndexChanged(...etc
Select Case TabControl1.SelectedIndex
Case 0
txtBox1.Focus()
Case 1
txtBox2.Focus()
Case 2
txtBox3.Focus()
End Select
End Sub
CanFocus is false for the tab page and the text box while in the sub.
TabControl1.SelectedTab = TabPage1 before txtBox1.Focus() doesn't help
either.
What am I missing?
Thanks