Vcl.ComCtrls.TMonthCalendar.MsgSetCalColors
Delphi
function MsgSetCalColors(ColorIndex: Integer; ColorValue: TColor): Boolean; override;
C++
virtual bool __fastcall MsgSetCalColors(int ColorIndex, System::Uitypes::TColor ColorValue);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | protected | Vcl.ComCtrls.pas Vcl.ComCtrls.hpp |
Vcl.ComCtrls | TMonthCalendar |
Description
Sets the calendar's colors.
MsgSetCalColors is used to implement the CalColors property. This protected method sets the calendar's colors using the Windows API call MonthCal_SetColor function.
ColorIndex indicates the area in the calendar for which a new color is specified. It is one of the following values:
ValueCalColors subpropertyArea
Value | CalColors subproperty | Area |
---|---|---|
0 |
Background (displayed between months). |
|
1 |
Dates in the current month and text labels. |
|
2 |
Background of the title bar. |
|
3 |
Text label in the title bar. |
|
4 |
Background of the calendar (each month). |
|
5 |
Dates on non-current month. |
ColorValue is the new color.
MsgSetCalColors returns true if the colors are successfully applied, false otherwise.