Skip to main content

dxSpreadSheetContains(TRect,TRect) Method

Returns a value indicating whether the table items or a cell range are included in the specified area.

Declaration

function dxSpreadSheetContains(const AArea: TRect; const ATestArea: TRect): Boolean;

Parameters

Name Type
AArea TRect
ATestArea TRect

Returns

Type
Boolean

Remarks

The first overloaded dxSpreadSheetContains function identifies whether the cell range specified as the ATestArea parameter is located within another cell range specified as the AArea parameter. For instance, the first overloaded dxSpreadSheetContains function returns True if the merged cell (AArea) is within the selected cell range (AArea):

However, if the specified area includes only a part of the test area, the first overloaded dxSpreadSheetContains function returns False:

The second overloaded dxSpreadSheetContains function returns True if both the row and column, whose indexes are specified as the ARow and AColumn parameters, pass through the AArea cell range. Otherwise, this function returns False.

Both overloaded dxSpreadSheetContains functions are used in selection and merged cell area calculations.

Note

If you need to check inclusion of either the column or row into the specified area, use either the dxSpreadSheetContainsColumn or dxSpreadSheetContainsRow function, respectively.

See Also