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

TControlCanvas.GetDefaultColor

Gets the color value used for clDefault.

Declaration

Source position: controls.pp line 372

protected function TControlCanvas.GetDefaultColor(

  const ADefaultColorType: TDefaultColorType

):TColor; override;

Arguments

ADefaultColorType

  

Identifies whether the font or brush color is resolved in the method.

Function result

TColor value for the specified color type. clDefault when the Control has not been assigned for the class instance.

Description

GetDefaultColor is used to resolve the default color (clDefault) to the TColor value used for the brush or font on the canvas. The ADefaultColorType argument indicates which value is needed in the return value. See TDefaultColorType for the values available in the argument.

GetDefaultColor is overridden in TControlCanvas to ensure that the Control is used (when assigned) to retrieve the default color by calling its GetDefaultColor method. If Control is not assigned, the inherited method is called to get the default color value (unresolved in the ancestor class).

See also

TControlCanvas.Control

  

The Control object for which the Canvas is used.

TCanvas.GetDefaultColor

  

Gets the default color value for the canvas.

TControl.GetDefaultColor

  

Gets the default color for the control.

TDefaultColorType

  

Indicates whether a default color applies to a font or a brush.


Version 3.2 Generated 2024-02-25 Home