SelectionChanged Event

Applies To
TabControl, Wizard

Description
Occurs when the selected page is changed.

Usage

Form_Control_SelectionChanged(Sender$ As String, SelectedIndex As Integer, PreviousIndex As Integer)
Sender$
Name of a control that sent the event.
SelectedIndex
The index number of the selected page.
PreviousIndex
The index number of the page that was selected before.

Values
Returns the number of the selected item with an integer, starting with 0. -1 is returned if no items are selected.

Remarks
Use SelectedIndex property to determine which item the user has selected in a ListBox or ComboBox. Typically, you would do this in the Click event of the control.

See Also
Tab Control, Wizard Control

Example

Function frmMain_TabControl1_SelectionChanged(Sender$ As String, SelectedIndex As Integer, PreviousIndex As Integer)
	Print "The TabControl selection was changed to ", Str$(SelectedIndex), " from ", Str$(PreviousIndex)
Fend