TX Text Control .NET Server

GetUpdateRectangle Method

Method|Introduced in 24.0
Namespace
TXTextControl.ServerVisualisation
Package
TXTextControl.TextControl.Core.SDK as TXTextControl.Server.Core.dll from the private NuGet feed or Text Control Offline Packages
Also in
TXTextControl.TextControl.ASP.SDK as TXTextControl.Server.dll

Description

Returns the coordinates of the smallest rectangle that completely encloses the update region. When the document's visible part changes, a Changed event occurs and the changed part is added to the view's update region. The bValidate parameter can be used to reset the current update region to an empty rectangle. When the document's visible part changes because the document has been scrolled, the Changed event informs about the changed part, but it is not added to the update region.

Syntax

GetUpdateRectangle(bool)

Returns the coordinates of the smallest rectangle that completely encloses the update region. When the document's visible part changes, a Changed event occurs and the changed part is added to the view's update region. The bValidate parameter can be used to reset the current update region to an empty rectangle. When the document's visible part changes because the document has been scrolled, the Changed event informs about the changed part, but it is not added to the update region.

public Rectangle GetUpdateRectangle(bool bValidate);
ParameterDescription
bValidate

Validates the current update region and resets it to an empty rectangle.

GetUpdateRectangle(bool, out int, out int)

public Rectangle GetUpdateRectangle(bool bValidate, out int iFirstInvalidLine, out int iLastInvalidLine);

Return Value

The return value specifies the smallest rectangle that completely encloses the current update region.

Examples

The following example retrieves update rectangle from the view.

var result = view.GetUpdateRectangle(true);
Console.WriteLine($"Get Update Rectangle result: {result}");