TMlSkinNCLabel
A text label on the title bar, typically the application or window name.
Notes
Lightadds a glow around the text, which helps on dark title bars.- Long text is ellipsized according to
EllipsisPosition, andMaxWidthcaps the width.
Example
From the demo MlSkin.Demo.不规则透明窗体.v3.0 (.dfm form file)
object nclbl1: TMlSkinNCLabel
Pos.Align = caLeft
Pos.XValue = 16
Pos.YValue = 16
Pos.UseDefault = False
Light.Active = False
Caption = 'MlSkin - Alpha Form Demo'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWhite
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
RenderText = True
Left = 192
Top = 121
end
Properties 7
| Name | Type | Default | Description |
|---|---|---|---|
Light | TMlLightClass | — | Text glow: switch it on, then set the glow color and blur radius. It makes text readable on dark backgrounds. |
EllipsisPosition | TEllipsisPosition | epNone | Where the ellipsis goes when the text is too long: epEndEllipsis at the end, epPathEllipsis in the middle (good for paths), epWordEllipsis at a word boundary, epNone none. |
Caption | string | — | The text to display. |
Font | TFont | — | Text font. |
CaptureMouse | Boolean | True | Whether the label receives mouse events. Turn it off and the mouse passes through to the title bar, so dragging over the text still moves the form. |
RenderText | Boolean | False | Whether the text is painted. Turning it off keeps the control in place but draws nothing, which is handy for temporarily hiding it. |
MaxWidth | Integer | 0 | Maximum text width in pixels; beyond it the text is ellipsized according to EllipsisPosition. |
Properties of TMlSkinNCCtrlBase 6
| 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. |
PutSide | TSideKind | skdTop | Which edge of the non-client area the control sits on: skdTop, skdBottom, skdLeft or skdRight. |
Tag | Integer | 0 | A spare integer for your own bookkeeping; the component itself does not use it. |
Pos | TNCCtrlPos | — | Position along that edge: an alignment plus X/Y offsets. With UseDefault on, the default layout is used. |
Hint | string | — | Tooltip text shown when the mouse rests on the control. |
Visible | Boolean | True | Whether the control is visible. |
Events of TMlSkinNCCtrlBase 5
| Name | Type | Default | Description |
|---|---|---|---|
OnLMouseDown | TNotifyEvent | — | Fires when the left mouse button goes down on the control. |
OnLMouseUp | TNotifyEvent | — | Fires when the left mouse button is released on the control. |
OnMouseEnter | TNotifyEvent | — | Fires when the mouse enters the control. |
OnMouseLeave | TNotifyEvent | — | Fires when the mouse leaves the control. |
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. |
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.
Offline helpA PDF / CHM version is available for offline reading.