[Overview][Constants][Types][Classes][Procedures and functions][Index] | Reference for unit 'ComCtrls' (#lcl)

# TCustomTabControl.OnChanging

Event handler signalled prior to changing the active tab/page on the tabbed control.

## Declaration

Source position: comctrls.pp line 493

`public property TCustomTabControl.OnChanging : TTabChangingEvent read FOnChanging write FOnChanging;`

## Description

OnChanging is a TTabChangingEvent property with the event handler signalled prior to changing the active page/tab on the tabbed control. OnChanging is signalled from the CanChange method, and occurs immediately before the new value is applied to the PageIndex property.

An application can implement and assign a handler routine to the property to determine whether the PageIndex and the active tab/page can be changed.

The Sender argument is the TCustomTabControl for the event.

AllowChange is a variable argument which indicates whether PageIndex can be changed. When set to True (the default), the value in PageIndex can be updated. Otherwise, the value in PageIndex is not updated.

## See also

TCustomTabControl.CanChange |  | Signals the OnChanging event handler prior to updates to PageIndex.
TCustomTabControl.CanChangePageIndex |  | CanChangePageIndex - determine whether it is permissible to change the index of the page.
TCustomTabControl.PageIndex |  | Ordinal position for the selected page on the tabbed control.
TTabChangingEvent |  | TTabChangingEvent - generic event handling method for a change in a notebook Tab.