Notes
BorderEffectNormal is the normal border image and BorderEffectHot the one used on hover.
- The swap only happens with
ActiveHotFrame on — that is how card hover highlighting is done.
Example
From the demo MlSkin.MainDemo.v3.0 (.dfm form file)
object mlsknbrdrpnl2: TMlSkinBorderPanel
Left = 24
Top = 464
Width = 537
Height = 129
Transparent = False
Alpha = 0
BorderSides = []
BorderEffectNormal = 'MlSkinBorderNormal'
BorderEffectHot = 'MlSkinBorderHot'
...
Properties 3
| Name | Type | Default | Description |
|---|
ActiveHotFrame | Boolean | True | Enables the hover border: with it on, the panel switches to BorderEffectHot while the mouse is over it. |
BorderEffectNormal | TMlResID | — | Border image in the normal state. |
BorderEffectHot | TMlResID | — | Border image used while the mouse is over the panel. |
Properties of TMlSkinPanel 16
| Name | Type | Default | Description |
|---|
Alpha | Byte | 192 | Opacity: 0 fully transparent, 255 opaque. |
BorderAlpha | Byte | 255 | Border opacity from 0 (invisible) to 255 (solid), useful for a subtle divider. |
BorderSides | TSides | — | Which border edges are drawn — any combination of top, bottom, left and right. |
BorderColor | TColor | $00D9CBBA | Border color. |
Color | TColor | clWhite | Background color of the control; ignored while Transparent is on. |
CaptionVisible | Boolean | False | Whether the caption is drawn. Turn it off for icon-only buttons. |
BackgroundFillType | TMlPngFillType | ftNormal | How the background image is laid out: ftNormal as-is, ftTile tiled, ftAutoStretch auto-stretched, ftCenter centred, ftStretch stretched to fill, ftGradient gradient. |
BackgroundImage | TMlResID | — | Background image, given as a resource ID or an image file path. |
BackgroundOffsetX | Integer | 0 | Horizontal offset of the background image in pixels. |
BackgroundOffsetY | Integer | 0 | Vertical offset of the background image in pixels. |
GradientDirection | TGradientDirection | gdVertical | Gradient direction: gdHorizontal or gdVertical. |
GradientAlign | TGradientAlign | gaCenter | Where the gradient is anchored: centre, left or right. |
GradientSize | Integer | 60 | Size of the gradient band in pixels. |
GradientStartColor | TColor | $00FFC446 | Starting color of the gradient. |
GradientEndColor | TColor | $00FDF8F3 | Ending color of the gradient. |
DoubleBorder | Boolean | True | Double border: draws a second line inside the border. |
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.