> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# On Region Change

> On Region Change runs before a field region is modified in the FlexiCapture image window; the AllowChangeRegion parameter can block the change.

## When it is launched

The script is launched prior to modifying a region in the image window.

* If the **AllowChangeRegion.Value** property is set to **true**, the region will be changed after the script execution.
* If the **AllowChangeRegion.Value** property is set to **false**, the region will not be changed.

By default, the value of the **AllowChangeRegion** parameter is **true**.

## Parameters

<table width="100%"><thead><tr><th><p><strong>Name</strong></p></th><th><p><strong>Type</strong></p></th><th><p><strong>Access</strong></p></th><th><p><strong>Description</strong></p></th></tr></thead><tbody><tr><td><p>AllowChangeRegion</p></td><td><p><a href="/flexi-capture/appendix/scripts-shell/iboolean">IBoolean</a></p></td><td><p>Read/write</p></td><td><p>Specifies whether to change the region.</p></td></tr><tr><td><p>Context</p></td><td><p><a href="/flexi-capture/appendix/scripts-shell/ifieldcontrol">IFieldRegionControl</a></p></td><td><p>Read/write</p></td><td><p>The region</p></td></tr><tr><td><p>NewRegionParam</p></td><td><p><a href="/flexi-capture/appendix/scripts-shell/i-shell-rects">IShellRects</a></p></td><td><p>Read/write</p></td><td><p>Rectangles of the region. For tables, the whole table region is passed.</p><p><strong>Note: </strong> When changing a container of the region, a new region of this container is returned and new regions of its child elements are not returned. When changing the region of a child element, only a new region of this child element is returned. For tables, the table region is always returned, also when changing a column or row region.</p></td></tr></tbody></table>
