TabIndex in TabControl

  • Thread starter Thread starter yhlove
  • Start date Start date
please read the reply for this message

Hi

I have a form with TabControl. the TabControl has 3 TabPages. each
tabpage has a panel that fills it.
Inside the panel I have a few buttons and others controls. These
controls cause the panel to have a vertical scrolled bar.
The problem is that when the form is loaded and the user see the first
tabpage and it's content and trying to scrool the panel with the mouse
it doesn't want to be scrolled.
I tried to give the panel tabindex=1 but it doesn't work.
Another partial solution I have found is:

Private Sub TabControl_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
TabControl1.SelectedIndexChanged
Panel1.Focus()
End Sub

but it works only if the user change the selected tabpage and if he do
it than he can scroll the panel with the mouse (but when the form is
loaded the first tabpage cannot be automatically scrolled)

Thanks
Yhlove
 
Back
Top