C1Tab Reference > C1Tab Events > Switch Event |
Fired before the current tab is changed (Click is fired after).
Private Sub C1Tab_Switch(OldTab As Integer, NewTab As Integer, Cancel As Integer)
The parameters for the Switch event are described below:
Parameter |
Description |
OldTab |
Holds the value of the current tab (before the switch). |
NewTab |
Holds the value of the tab that is about to become current. You may modify this value to activate a different tab. |
Cancel |
Set this parameter to True to cancel the switch (OldTab remains current.) |
This event is useful when you have to validate data or save the contents of controls on the current tab page before switching tabs.
Note: To update the display after a tab switch, trap the Click event instead.