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

# TControl.VisibleChanging

Notifies all chtOnVisibleChanging handlers for the control.

## Declaration

Source position: controls.pp line 1540

`protected procedure TControl.VisibleChanging; virtual;`

## Description

VisibleChanging is called when a new value is assigned to the Visible property. It occurs before the new property value is stored to its member in the class instance. It allows all of the TNotifyEvent routines registered for the chtOnVisibleChanging control handler type to be signalled prior to the change in the property value.

VisibleChanging calls the DoCallNotifyHandler method to signal each of the handler routines using the chtOnVisibleChanging control handler type. The class instance is used as the Sender argument for the event notification.

Use AddHandlerOnVisibleChanging and RemoveHandlerOnVisibleChanging to manage the TNotifyEvent handler routines for the chtOnVisibleChanging handler type used in the control.

See VisibleChanged for the actions performed after the value in Visible has been updated.

## See also

TControl.Visible |  | Allows the control, and all of its children, to be displayed or hidden.
TControl.DoCallNotifyHandler |  | Signals handler routines for the specified control handler type.
TControl.AddHandlerOnVisibleChanging |  | Adds or inserts the specified OnVisibleChanging event handler.
TControl.RemoveHandlerOnVisibleChanging |  | Removes the specified OnVisibleChanging event handler.
TControl.VisibleChanged |  | Notifies all chtOnVisibleChanged handlers for the control.
TControlHandlerType |  | Notification handler types.
TNotifyEvent