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

# TCanvas.RegionChanging

Implements the OnChanging event handler for the Region on the canvas.

## Declaration

Source position: graphics.pp line 1081

`protected procedure TCanvas.RegionChanging(`
`ARegion: TObject`
`); virtual;`

## Arguments

`ARegion` |  | Not used in the current implementation of the method.

## Description

RegionChanging is assigned as the OnChanging event handler for the Region property in the constructor for the class instance. It allows the canvas class to be notified and updated when the region for the canvas is modified.

RegionChanging ensures that both the Handle and the Region for the canvas are valid. No actions are performed in the method if State does not contain the values csRegionValid and csHandleValid. It removes csRegionValid from the States property and reselects the handle for the Region on the control.