From 74c1a47a8b04deaf61bccbc24a2d8a90727ce770 Mon Sep 17 00:00:00 2001 From: Sunny Date: Wed, 13 Jul 2022 15:57:23 +0800 Subject: [PATCH] =?UTF-8?q?*=20UIMessageBox:=20=E6=B6=88=E6=81=AF=E5=BC=B9?= =?UTF-8?q?=E7=AA=97=E6=96=87=E6=9C=AC=E5=A2=9E=E5=8A=A0=E6=BB=9A=E5=8A=A8?= =?UTF-8?q?=E6=9D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SunnyUI/Forms/UIMessageForm.Designer.cs | 18 ++++++++++++------ SunnyUI/Forms/UIMessageForm.cs | 5 ++++- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/SunnyUI/Forms/UIMessageForm.Designer.cs b/SunnyUI/Forms/UIMessageForm.Designer.cs index a4ad1a4c..98851e97 100644 --- a/SunnyUI/Forms/UIMessageForm.Designer.cs +++ b/SunnyUI/Forms/UIMessageForm.Designer.cs @@ -30,7 +30,7 @@ { this.btnCancel = new Sunny.UI.UIButton(); this.btnOK = new Sunny.UI.UIButton(); - this.lbMsg = new System.Windows.Forms.RichTextBox(); + this.lbMsg = new Sunny.UI.UIRichTextBox(); this.SuspendLayout(); // // btnCancel @@ -74,15 +74,21 @@ // lbMsg // this.lbMsg.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255))))); - this.lbMsg.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.lbMsg.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32))))); + this.lbMsg.FillColor = System.Drawing.Color.White; + this.lbMsg.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lbMsg.Location = new System.Drawing.Point(14, 50); + this.lbMsg.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.lbMsg.MinimumSize = new System.Drawing.Size(1, 1); this.lbMsg.Name = "lbMsg"; + this.lbMsg.Padding = new System.Windows.Forms.Padding(2); + this.lbMsg.RadiusSides = Sunny.UI.UICornerRadiusSides.None; this.lbMsg.ReadOnly = true; - this.lbMsg.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.None; + this.lbMsg.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.None; + this.lbMsg.ShowText = false; this.lbMsg.Size = new System.Drawing.Size(422, 158); this.lbMsg.TabIndex = 7; - this.lbMsg.Text = ""; + this.lbMsg.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter; + this.lbMsg.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0); // // UIMessageForm // @@ -107,6 +113,6 @@ private UIButton btnCancel; private UIButton btnOK; - private System.Windows.Forms.RichTextBox lbMsg; + private UIRichTextBox lbMsg; } } \ No newline at end of file diff --git a/SunnyUI/Forms/UIMessageForm.cs b/SunnyUI/Forms/UIMessageForm.cs index 59da8322..bb9e8dc3 100644 --- a/SunnyUI/Forms/UIMessageForm.cs +++ b/SunnyUI/Forms/UIMessageForm.cs @@ -18,6 +18,7 @@ * * 2020-01-01: V2.2.0 增加文件说明 * 2021-11-09: V3.0.8 多个按钮显示时增加FocusLine + * 2022-07-13: V3.2.1 消息弹窗文本增加滚动条 ******************************************************************************/ using System; @@ -141,8 +142,10 @@ namespace Sunny.UI if (lbMsg != null) { lbMsg.ForeColor = uiColor.LabelForeColor; - lbMsg.BackColor = BackColor; + lbMsg.BackColor = uiColor.PlainColor; + lbMsg.FillColor = uiColor.PlainColor; lbMsg.SelectionColor = RectColor; + lbMsg.ScrollBarColor = uiColor.RectColor; } }