TMlSkinMessageBoxStyle
消息框皮肤组件,把程序里弹出的消息框换成 MlSkin 样式,包括按钮、字体和标题。
用法要点
- 放一个在窗体上,之后调用 MlSkin 的消息框函数弹出的对话框就使用这里的样式。
- 按钮外观用
ButtonPictures,正常和悬停字体分别是ButtonFont、ButtonHotFont。 - 一组
Define...Text属性用来改按钮文字(是、否、确定、取消、重试等),做多语言时用得上。 DefineDonotShowAgainText是「不再提示」勾选项的文字。
示例
摘自 Demo:MlSkin.Demo.TMlSkinSpeedometer.网络测速.v4.x(窗体文件 .dfm)
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
属性 17
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
ButtonPictures | TPngPictures | — | 消息框按钮的图片(正常、悬停、按下各一帧)。 |
Form | TMlFormSkinRes | — | 消息框窗体的皮肤设置:背景、边框、标题栏等。 |
MessageFont | TFont | — | 消息正文的字体。 |
MessageLight | TMlLightClass | — | 消息正文的发光效果。 |
HideLine | Boolean | — | 是否隐藏消息区与按钮区之间的分隔线。 |
CaptionFont | TFont | — | 消息框标题的字体。 |
ButtonFont | TFont | — | 按钮文字的字体。 |
ButtonHotFont | TFont | — | 鼠标移到按钮上时的文字字体。 |
CaptionLight | TMlLightClass | — | 标题文字的发光效果。 |
DefineYesButtonText | string | — | 「是」按钮的文字,用于多语言。 |
DefineNoButtonText | string | — | 「否」按钮的文字。 |
DefineOKButtonText | string | — | 「确定」按钮的文字。 |
DefineCancelButtonText | string | — | 「取消」按钮的文字。 |
DefineAbortButtonText | string | — | 「中止」按钮的文字。 |
DefineRetryButtonText | string | — | 「重试」按钮的文字。 |
DefineIgnoreButtonText | string | — | 「忽略」按钮的文字。 |
DefineDonotShowAgainText | string | — | 「不再提示」勾选项的文字。 |
本页只列出 MlSkin 新增的属性和事件;Align、Anchors、Font、OnClick 等标准 VCL 属性同样可用,用法与原生控件一致。