Notes
Year and Month set the month on display; FocusDay is the selected day.
- The header row and the day cells are styled separately:
HeaderColor, HeaderFont, CellColor and CellFont.
- Clicking a day fires
OnCellClick; to draw markers inside a cell (a dot on days with events, say) use OnCellDrawing.
- The weekday labels are customizable through
TextSu … TextSa, which makes localization easy.
Properties 24
| Name | Type | Default | Description |
|---|
HolidayTextColor | TColor | — | Text color used for weekend days. |
HeaderColor | TColor | — | Background color of the header row. |
HeaderFont | TFont | — | Font of the header row. |
HeaderHeight | Integer | — | Height of the header row in pixels. |
CellColor | TColor | — | Background color of the day cells. |
CellFocusColor | TColor | — | Background color of the selected day cell. |
CellFont | TFont | — | Font of the day numbers. |
TextSu | string | — | Header label for Sunday. |
TextMo | string | — | Header label for Monday. |
TextTu | string | — | Header label for Tuesday. |
TextWe | string | — | Header label for Wednesday. |
TextTh | string | — | Header label for Thursday. |
TextFr | string | — | Header label for Friday. |
TextSa | string | — | Header label for Saturday. |
Year | Word | — | The year on display. |
Month | Word | — | The month on display (1–12). |
FocusDay | Word | — | The selected day of the month. |
Padding | Integer | — | Padding in pixels between the calendar content and the control edge. |
FrameColor | TColor | — | Border color. |
MaxDate | TDate | — | Latest selectable date. |
MinDate | TDate | — | Earliest selectable date. |
Alpha | Byte | 192 | Opacity: 0 fully transparent, 255 opaque. |
BorderSides | TSides | — | Which border edges are drawn — any combination of top, bottom, left and right. |
BorderColor | TColor | $00D9CBBA | Border color. |
Events 3
| Name | Type | Default | Description |
|---|
OnCellClick | TCellClickEvent | — | Fires when a day cell is clicked; the handler receives the day that was clicked. |
OnCellDrawing | TDrawCellEvent | — | Fires while a day cell is drawn, so you can paint your own markers inside it — a dot on days with appointments, for instance. |
OnChanged | TNotifyEvent | — | Fires after the state or value has changed. |
Properties of TMlSkinCustomPanel 1
| Name | Type | Default | Description |
|---|
Color | TColor | clWhite | Background color of the control; ignored while Transparent is on. |
Events of TMlSkinCustomPanel 1
| Name | Type | Default | Description |
|---|
OnCustomDraw | TMlCustomDrawEvent | — | Custom draw event: paint your own content after the control has drawn itself. |
Properties of TMlSkinCustomControl 5
| Name | Type | Default | Description |
|---|
About | TMlAboutInfo | — | A design-time property: double-clicking it in the Object Inspector opens the MLSkin about box with the component version. It has no effect at run time and is not stored in the .dfm. |
Transparent | Boolean | True | Transparent background: the control skips its own fill and shows the form background (image or color) instead. |
Color | TColor | clWhite | Background color of the control; ignored while Transparent is on. |
AutoInvalidate | Boolean | False | Repaints automatically when the content changes. Turn it on if property changes do not show up. |
EraseBackground | Boolean | False | Whether the background is erased before painting; worth toggling if the control flickers. |
Events of TMlSkinCustomControl 4
| Name | Type | Default | Description |
|---|
OnDPIChanged | TMlDPIChangedEvent | — | Fires when the screen DPI changes, for example when the window moves to a monitor with a different scaling — a good place to re-adjust anything you draw yourself. |
OnBackgroundChanging | TMlBackgroundEvent | — | Fires just before the background changes, giving you a chance to adjust what is drawn. |
OnBackgroundChanged | TMlCustomDrawEvent | — | Fires after the background has been drawn, so you can paint on top of it. |
OnVisibleChanged | TNotifyEvent | — | Fires when the control is shown or hidden. |
Only the properties and events MLSkin adds are listed here. Standard VCL properties such as Align, Anchors, Font and OnClick are available too and behave exactly as on the stock controls.