TMlSkinLine

A divider line, horizontal or vertical, for separating areas of the interface.

Category
Panels & containers
Unit
uMlSkinLine.pas
Inherits from
TMlSkinCustomControl

Notes

  • Kind picks horizontal (lkHorizontal) or vertical (lkVertical).
  • Style sets the pen style: solid, dotted or dashed.
  • Turn on ActiveGradient for a line that fades out at the ends, using GradientStartColor and GradientEndColor.

Example

From the demo MlSkin.Demo.摇奖程序.v3.0 (.dfm form file)

object ln1: TMlSkinLine
  Left = 19
  Top = 33
  Width = 81
  Height = 2
  Color = 4803827
  AutoInvalidate = True
  AutoSize = False
  ActiveGradient = False
  GradientAlign = gaRight
  GradientStartColor = 4803827
  GradientEndColor = 12172283
end

Properties 9

NameTypeDefaultDescription
AutoSizeBooleanFalseWhether the control's thickness follows its orientation automatically.
ActiveGradientBooleanTrueTurns gradient painting on.
StyleTMlPenStylepsSolidPen style: psSolid, psDot or psDash.
KindTLineKindlkHorizontalLine orientation: lkHorizontal or lkVertical.
GradientAlignTGradientAligngaCenterWhere the gradient is anchored: centre, left or right.
GradientSizeInteger60Size of the gradient band in pixels.
GradientStartColorTColor$00BCAA8CStarting color of the gradient.
GradientEndColorTColor$00FDF8F3Ending color of the gradient.
ColorTColor$00FDF8F3Background color of the control; ignored while Transparent is on.
Properties of TMlSkinCustomControl 4
NameTypeDefaultDescription
AboutTMlAboutInfoA 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.
TransparentBooleanTrueTransparent background: the control skips its own fill and shows the form background (image or color) instead.
AutoInvalidateBooleanFalseRepaints automatically when the content changes. Turn it on if property changes do not show up.
EraseBackgroundBooleanFalseWhether the background is erased before painting; worth toggling if the control flickers.
Events of TMlSkinCustomControl 4
NameTypeDefaultDescription
OnDPIChangedTMlDPIChangedEventFires 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.
OnBackgroundChangingTMlBackgroundEventFires just before the background changes, giving you a chance to adjust what is drawn.
OnBackgroundChangedTMlCustomDrawEventFires after the background has been drawn, so you can paint on top of it.
OnVisibleChangedTNotifyEventFires 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.

Offline helpA PDF / CHM version is available for offline reading.