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

# TLazRegion.AddPart

Adds the specified part as a subregion in the Parts member.

## Declaration

Source position: lazregions.pas line 79

`public procedure TLazRegion.AddPart(`
`APart: TLazRegionPart`
`);`

## Arguments

`APart` |  | TLazRegionPart (or descendant) added in the method.

## Description

AddPart is a procedure used to add the specified TLazRegionPart in APart to the Parts member in the class instance. AddPart calls the TFPList.Add method to store the value in APart in the list. AddPart calls DoChangeToComplexRegion to update IsSimpleRectRegion to reflect the current composition for the region.

AddPart is used in the implementation of the AddRectangle, AddPolygon, and AddEllipse methods.

## See also

TLazRegion.DoChangeToComplexRegion |  | Adds the value in Rect to the Parts member, and resets the value in IsSimpleRectRegion.
TLazRegion.IsSimpleRectRegion |  | Indicates whether this region is composed of a single rectangular part.
TLazRegion.AddRectangle |  | Adds the specified TRect instance to the Parts member.
TLazRegion.AddPolygon |  | Adds a polygonal area with the specified vertices to the region.
TLazRegion.AddEllipse |  | Adds an elliptical area with the specified co-vertices to the region.
TLazRegionPart |  | Base class used for rectangular areas in a region.