In This Article

Page Selection

All pages in a TabStrip are listed in its Pages collection. The selected page can be set programmatically by using the SelectedPage property. The SelectedIndex property also can change the selected page.

Selection Events

There are two events that are raised when selection changes occur.

The SelectionChanging event is raised immediately before a selection change occurs. Its event arguments specify the TabStripPage that is about to be selected.

The SelectionChanged event is raised immediately after a selection change occurs.

Alternatively, if a mouse click occurs on a tab that is already selected, the Reselect event is raised.

Cancelling Selection Changes

Most selection changes can be cancelled by handling the SelectionChanging event and setting its Cancel property to true.