Sign in Join
FPDoc Onlineexperiment

TWinControl.SetColor procedure

Member of TWinControlprotectedIn unit Controls

Sets the value for the Color property.

Declaration

pascal
procedure SetColor(Value: TColor); override

Description

SetColor is an overridden method in TWinControl used to set the value for the Color property. It calls the inherited method on entry, and ensures that the new property value is applied to the internal TBrush instance used in the control. This includes translating the value clDefault to the actual brush color used for the platform.

If the Handle has been allocated for the control, the widgetset class is updated. Otherwise, control flags are updated to include the value wcfColorChanged.

The NotifyControls method is called to send the CM_PARENTCOLORCHANGED control message to the child controls.

See also

An experiment, built from Lazarus main 2dfa93c66e of 10-22-2026. Not the official Lazarus documentation.