TMlSkinMessageBoxStyle

The message box skinning component: it restyles the dialogs the application pops up, including buttons, fonts and the title.

Category
Dialogs & misc
Unit
uMlSkinMessageBox.pas
Inherits from
TComponent

Notes

  • Drop one on the form and the MLSkin message box functions will use these settings.
  • ButtonPictures supplies the button images, with ButtonFont and ButtonHotFont for the normal and hover states.
  • The Define…Text properties relabel the buttons (Yes, No, OK, Cancel, Retry and so on), which is what localization needs.
  • DefineDonotShowAgainText is the caption of the "do not show again" check box.
  • Turn on Flat to give the boxes shown by MlMessageBox a modern look with flat rounded buttons, the default one in FlatAccentColor; nudge the caption and close button with CaptionX / CaptionY and CloseImageX / CloseImageY.

Example

From the demo MlSkin.Demo.TMlSkinSpeedometer.网络测速.v4.x (.dfm form file)

object mlmbs1: TMlSkinMessageBoxStyle
  ButtonPictures.Active = True
  ButtonPictures.Image = 'MlSkinButton'
  ButtonPictures.Normal = 0
  ButtonPictures.Hot = 1
  ButtonPictures.Disable = 3
  ButtonPictures.Count = 5
  ButtonPictures.Pressed = 2
  Form.ActiveGradient = True
  Form.DoubleFrame = False
  Form.FillStyle = mfsBlur
  Form.FlatFrame = False
  Form.RoundWindow = True
  Form.TitleHeight = 27
  Form.TitlerColor = 13411945
  Form.Color = 15138779
  Form.FramWidth = 2
  Form.HitTestWidth = 5
  Form.GradientHeight = 68
  Form.Style = ssColor

Properties 25

NameTypeDefaultDescription
ButtonPicturesTPngPictures—Images for the dialog buttons — normal, hot and pressed frames.
FormTMlFormSkinRes—Skin settings for the dialog window itself: background, border and title bar.
MessageFontTFont—Font of the message text.
MessageLightTMlLightClass—Glow effect for the message text.
HideLineBoolean—Hides the divider between the message area and the buttons.
FlatBooleanFalseFlat message box: flat rounded buttons (the default button filled with FlatAccentColor, the others light gray), all 88×32 and right-aligned, with a taller button bar and roomier padding.
FlatAccentColorTColor$004A3CD9Accent color of the default button in flat style; red by default.
CloseImagestring—Resource ID of the title-bar close button; empty uses the built-in MlSkinTips_close.
CloseImageXInteger22Distance of the close button from the window's right edge in pixels, default 22.
CloseImageYInteger4Distance of the close button from the top edge in pixels, default 4.
CaptionXInteger-1Horizontal position of the caption (left-aligned, pixels). -1 (default) uses the caption label's default position.
CaptionYInteger-1Vertical position of the caption in pixels. -1 (default) uses the default position.
FormRoundCornerInteger0Corner radius of the message box window, used when Form.RoundWindow is on. 0 (default) keeps the TMlSkinForm default.
CaptionFontTFont—Font of the dialog title.
ButtonFontTFont—Font of the button captions.
ButtonHotFontTFont—Font used for a button caption while the mouse is over it.
CaptionLightTMlLightClass—Glow effect for the title text.
DefineYesButtonTextstring—Caption of the Yes button, for localization.
DefineNoButtonTextstring—Caption of the No button.
DefineOKButtonTextstring—Caption of the OK button.
DefineCancelButtonTextstring—Caption of the Cancel button.
DefineAbortButtonTextstring—Caption of the Abort button.
DefineRetryButtonTextstring—Caption of the Retry button.
DefineIgnoreButtonTextstring—Caption of the Ignore button.
DefineDonotShowAgainTextstring—Caption of the "do not show again" check box.

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.