TMlSkinPopupMessage

A notification window that pops up from the bottom-right corner of the screen, similar to a system toast.

Category
Title-bar controls
Unit
uMlSkinPopupMessage.pas
Inherits from
TComponent

Notes

  • Call the component's popup method to show a message; ClosePause sets how long it stays before closing itself.
  • When several messages appear at once, HeapUp stacks them upwards and AutoAlign arranges their positions.
  • The three Icon properties are the icons for success, failure and information messages.
  • With AvoidFullScreenDisturb on, nothing pops up while a full-screen application (a video or a presentation) is detected.

Example

From the demo MlSkin.Demo.HtmlLabel&TMlSkinPopupMessage功能演示.v4.x (.dfm form file)

object mlpm1: TMlSkinPopupMessage
  TitleFont.Charset = DEFAULT_CHARSET
  TitleFont.Color = clWindowText
  TitleFont.Height = -11
  TitleFont.Name = 'Tahoma'
  TitleFont.Style = []
  TextFont.Charset = DEFAULT_CHARSET
  TextFont.Color = clWindowText
  TextFont.Height = -11
  TextFont.Name = 'Tahoma'
  TextFont.Style = []
  ClientColor = 15920353
  Icon_Success = 'MlSkinMsgIcon_OK'
  Icon_Failue = 'MlSkinMsgIcon_Error'
  Icon_Information = 'MlSkinMsgIcon_Info'
  Left = 200
  Top = 520
end

Properties 17

NameTypeDefaultDescription
ActiveAnimateBooleanTrueWhether the window slides in when it appears.
AvoidFullScreenDisturbBooleanTrueDo-not-disturb: no message pops up while a full-screen application (video, presentation) is running.
ClosePauseInteger5000How long the message stays on screen, in milliseconds, before closing itself.
HeapUpBooleanTrueStacks multiple messages upwards instead of letting them overlap.
AutoAlignBooleanTrueArranges the message windows automatically, closing gaps when one of them disappears.
MinHeightInteger100Minimum height of the message window in pixels; it grows as needed for longer content.
WidthInteger228Width of the message window in pixels.
TitileColorTColor$00FFC446Color of the message title bar.
TitleFontTFontFont of the title text.
TextFontTFontFont of the message body.
TextOffsetXInteger10Horizontal offset of the body text in pixels.
TextOffsetYInteger20Vertical offset of the body text in pixels.
ClientColorTColorBackground color of the message body area.
Icon_SuccessTMlResIDIcon for success messages.
Icon_FailueTMlResIDIcon for failure messages.
Icon_InformationTMlResIDIcon for information messages.
ButtonTMsgButtonThe button on the message window: caption, fonts, images and whether it is visible.

Events 3

NameTypeDefaultDescription
OnButtonClickTNotifyEventFires when the button on the message window is clicked.
OnCloseTNotifyEventFires when the message closes, whether automatically or by the user.
OnClickTNotifyEventFires when the message window is clicked, typically to open the details.

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.