Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

How to set focus on control within tabcontrol when tab changes?

vbnvbn Member Posts: 60
I have a tabcontrol with three tabs.

First tab has several controls.
Second tab has only one control.
And the last tab has several controls.

How do I set the focus to a control within a tab when the tab page changes?

Code such as the following did not work for me.

If Me.TabControl1.SelectedIndex = myTabPageTreatment Then
txbVisitTreatment.Focus()
End If

Thanks for all help!!!
vbn

Comments

Sign In or Register to comment.