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

# TCustomGrid.FlipRect

Flips coordinates for the specified cell rectangle when BiDiMode or RTL alignment is used.

## Declaration

Source position: grids.pas line 1321

`protected function TCustomGrid.FlipRect(`
`ARect: TRect`
`):TRect;`

## Arguments

`ARect` |  | Control display area examined and potentially updated in the method.

## Function result

TRect instance with the updated display area for the control.

## Description

FlipRect causes the control display area in ARect to be aligned to the opposite horizontal edge of the parent control when UseRightToLeftAlignment is enabled. Values in the Left and Right members in ARect are modified to reflect the new position / alignment.

FlipRect calls the BidiFlipRect routine to reposition the control on the parent rectangle.

The return value is a TRect instance with modified Left and Right coordinates for the repositioned control.

No actions are performed in the method when UseRightToLeftAlignment is set to False, and the return value is set to ARect.

## See also

BidiFlipRect |  | Flips the left and right coordinates in a rectangle and makes it relative to the ParentRect when Flip is True.