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

# TBrush.SetColor

Sets the value for the Color property.

## Declaration

Source position: graphics.pp line 725

`protected procedure TBrush.SetColor(`
`const NewColor: TColor;`
`const NewFPColor: TFPColor`
`); virtual; procedure TBrush.SetColor(`
`Value: TColor`
`);`

## Arguments

`NewColor` |  | TColor value applied to the brush Color.
`NewFPColor` |  | TFPColor value applied to the brush Color.

## Arguments

`Value` |  | New value for the property.

## Description

An overloaded variant provides both TColor and TFPColor values. It is used to set the color by calling the SetFPColor method in the ancestor class. No actions are performed in the method when the values in Color and FPColor have not been changed and the brush Style contains bsClear.

Frees the brush handle in the References property, and sets the value in Bitmap to Nil. Calls the inherited SetStyle method when Style is bsClear. Calls Changed to signal the OnChange event handler (when assigned).

## See also

TBrush.Color |  | The Color of the current Brush.
TBrush.Style |  | Indicates the pattern drawn using the brush.
TBrush.Reference |  | Contains a Reference to the handle allocated for the Brush.
TBrush.Bitmap |  | Bitmap with the pattern for the Brush.