tab control navigation buttons

  • Thread starter Thread starter msreal
  • Start date Start date
M

msreal

Hi,

does anyone know how to create navigation-buttons to scroll to the tab
in a tab control? I have a tab control with seven tabs and I want t
create navigation-buttons similar to the record-choosers. All help i
welcome.

Thanks in advance
 
msreal said:
Hi,

does anyone know how to create navigation-buttons to scroll to the tabs
in a tab control? I have a tab control with seven tabs and I want to
create navigation-buttons similar to the record-choosers. All help is
welcome.

The TabControl has a Value property. When set in code this causes the
TabPage with that index value to be brought to the front. So...

Me.TabControlName.Value = 2

....would take you to the third tab page. You can expand on this with the
following for a "go to next page" button.

If Me.TabControlName.Value = 6 Then
Me.TabControlName.Value = 0
Else
Me.TabControlName.Value = Me.TabControlName.Value + 1
End If

The "go to previous" button would simply reverse the logic used above.
 
Back
Top