TMlSkinMessageBoxStyle
The message box skinning component: it restyles the dialogs the application pops up, including buttons, fonts and the title.
Notes
- Drop one on the form and the MLSkin message box functions will use these settings.
ButtonPicturessupplies the button images, withButtonFontandButtonHotFontfor the normal and hover states.- The
Define…Textproperties relabel the buttons (Yes, No, OK, Cancel, Retry and so on), which is what localization needs. DefineDonotShowAgainTextis the caption of the "do not show again" check box.- Turn on
Flatto give the boxes shown byMlMessageBoxa modern look with flat rounded buttons, the default one inFlatAccentColor; nudge the caption and close button withCaptionX/CaptionYandCloseImageX/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
| Name | Type | Default | Description |
|---|---|---|---|
ButtonPictures | TPngPictures | — | Images for the dialog buttons — normal, hot and pressed frames. |
Form | TMlFormSkinRes | — | Skin settings for the dialog window itself: background, border and title bar. |
MessageFont | TFont | — | Font of the message text. |
MessageLight | TMlLightClass | — | Glow effect for the message text. |
HideLine | Boolean | — | Hides the divider between the message area and the buttons. |
Flat | Boolean | False | Flat 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. |
FlatAccentColor | TColor | $004A3CD9 | Accent color of the default button in flat style; red by default. |
CloseImage | string | — | Resource ID of the title-bar close button; empty uses the built-in MlSkinTips_close. |
CloseImageX | Integer | 22 | Distance of the close button from the window's right edge in pixels, default 22. |
CloseImageY | Integer | 4 | Distance of the close button from the top edge in pixels, default 4. |
CaptionX | Integer | -1 | Horizontal position of the caption (left-aligned, pixels). -1 (default) uses the caption label's default position. |
CaptionY | Integer | -1 | Vertical position of the caption in pixels. -1 (default) uses the default position. |
FormRoundCorner | Integer | 0 | Corner radius of the message box window, used when Form.RoundWindow is on. 0 (default) keeps the TMlSkinForm default. |
CaptionFont | TFont | — | Font of the dialog title. |
ButtonFont | TFont | — | Font of the button captions. |
ButtonHotFont | TFont | — | Font used for a button caption while the mouse is over it. |
CaptionLight | TMlLightClass | — | Glow effect for the title text. |
DefineYesButtonText | string | — | Caption of the Yes button, for localization. |
DefineNoButtonText | string | — | Caption of the No button. |
DefineOKButtonText | string | — | Caption of the OK button. |
DefineCancelButtonText | string | — | Caption of the Cancel button. |
DefineAbortButtonText | string | — | Caption of the Abort button. |
DefineRetryButtonText | string | — | Caption of the Retry button. |
DefineIgnoreButtonText | string | — | Caption of the Ignore button. |
DefineDonotShowAgainText | string | — | 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.