TMlSkinScrollMsgBar

A scrolling message bar that cycles through several messages — handy for announcements and status lines.

Category
Labels & hints
Unit
uMlSkinScrollMsgBar.pas
Inherits from
TCustomMlSkinScrollMsgBarTMlSkinCustomLayerControl

Notes

  • AutoScroll cycles automatically and ScrollInterval sets how long each message stays.
  • AnimateEasing picks the easing used between messages (back, elastic, sine and others) and AnimateStep tunes the step size.
  • With AllowClick on, clicking a message fires OnItemClick, which can open the matching detail.
  • Use OnItemPaint to draw the messages yourself.

Example

From the demo MlSkin.Demo.滚动消息栏.v3.0 (.dfm form file)

object sm1: TMlSkinScrollMsgBar
  Left = 0
  Top = 117
  Width = 521
  Height = 36
  AllowClick = False
  Alignment = taCenter
  OnItemClick = sm1ItemClick
  Align = alBottom
  Color = clWhite
  ParentColor = False
  TabOrder = 5
  DesignSize = (
  521
  36)
  ...

Properties 9

NameTypeDefaultDescription
TransparentBooleanFalseTransparent background: the control skips its own fill and shows the form background (image or color) instead.
AnimateStepInteger15Step size of the scroll animation: larger moves faster but looks jumpier.
AnimateEasingTAnimateEasingaeQuadEasing used when switching messages — back, elastic, sine, expo and so on — which shapes how the scroll accelerates.
AllowClickBooleanTrueWhether messages are clickable; when on, clicking fires OnItemClick.
AutoScrollBooleanTrueWhether the bar cycles to the next message automatically.
AlignmentTAlignmenttaLeftJustifyText alignment.
SpaceInteger5Padding between the text and the border (left, top, right, bottom); switch its Active on first.
ScrollIntervalInteger3000How long each message stays before the bar scrolls to the next, in milliseconds.
LoopModeBooleanTrueWhether the list repeats; with it off the bar stops after the last message.

Events 2

NameTypeDefaultDescription
OnItemClickTSMItemClickEventFires when a message is clicked, passing that message to the handler.
OnItemPaintTSMItemDrawEventFires while a message is painted, so you can draw it yourself.
Properties of TMlSkinCustomLayerControl 1
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.

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.