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

# TCustomShape.Brush

The Brush used to fill the shaped control.

## Declaration

Source position: extctrls.pp line 299

`public property TCustomShape.Brush : TBrush read FBrush write SetBrush;`

## Description

Brush is a TBrush property which contains the attributes used to fill the shaped control. Its Color property can be used to control the fill color for the shaped control. Its Style property determines whether the fill Color is opaque or transparent.

Resources allocated to Brush are managed by the class instance in the Create and Destroy methods. Setting a new value for the property causes Invalidate to be called to redraw the control.

Brush and Pen are used in the DrawToCanvas method, and in UpdateMask when the internal mask image is created for the shaped control.

Use Pen to set attributes applied to the lines drawn for the Shape on the control.

## See also

TCustomShape.Pen |  | The Pen used to draw lines on the shaped control.
TCustomShape.Create |  | Constructor for the class instance.
TCustomShape.Destroy |  | Destructor for the class instance.
TCustomShape.DrawToCanvas |  | Draws the Shape for the control on the specified canvas.
TCustomShape.UpdateMask |  | Updates the internal Monochrome bitmap used as a mask to detect mouse click events on the shaped control.
TBrush |  | The Brush to be used to Paint on the current Canvas.
TControl.Invalidate |  | Causes a delayed Repaint of the control by marking its visible area of the control as invalid.