From fafc41228b76b499aadb12f2d8a29446867e108a Mon Sep 17 00:00:00 2001 From: zqm Date: Tue, 11 Nov 2025 15:27:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9toolStrip=E5=B8=83=E5=B1=80?= =?UTF-8?q?=E4=B8=BAFlow=E5=B9=B6=E8=AE=BE=E7=BD=AE=E6=8E=A7=E4=BB=B6?= =?UTF-8?q?=E9=97=B4=E8=B7=9D=EF=BC=8C=E7=A1=AE=E4=BF=9D=E7=A9=BA=E9=97=B4?= =?UTF-8?q?=E4=B8=8D=E8=B6=B3=E6=97=B6=E5=85=81=E8=AE=B8=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E5=A4=9A=E8=A1=8C=E6=98=BE=E7=A4=BA=EF=BC=8C=E5=90=8C=E6=97=B6?= =?UTF-8?q?=E4=BF=9D=E8=AF=81lblRegionNumber=E5=92=8CtxtRegionNumber?= =?UTF-8?q?=E5=9C=A8=E5=90=8C=E4=B8=80=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Framework4.0/Toprie/Toprie/Setting.Designer.cs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Windows/CS/Framework4.0/Toprie/Toprie/Setting.Designer.cs b/Windows/CS/Framework4.0/Toprie/Toprie/Setting.Designer.cs index f997b38..afc2e7a 100644 --- a/Windows/CS/Framework4.0/Toprie/Toprie/Setting.Designer.cs +++ b/Windows/CS/Framework4.0/Toprie/Toprie/Setting.Designer.cs @@ -208,12 +208,16 @@ namespace JoyD.Windows.CS // 使用Padding属性调整文本垂直位置,实现垂直居中效果 this.lblRegionNumber.Padding = new System.Windows.Forms.Padding(0, 3, 0, 0); this.lblRegionNumber.TextDirection = System.Windows.Forms.ToolStripTextDirection.Horizontal; + // 设置Margin属性确保与txtRegionNumber紧密相连,避免被分割到不同行 + this.lblRegionNumber.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); this.txtRegionNumber = new System.Windows.Forms.ToolStripTextBox(); this.txtRegionNumber.Name = "txtRegionNumber"; this.txtRegionNumber.Size = new System.Drawing.Size(60, 25); this.txtRegionNumber.KeyDown += new System.Windows.Forms.KeyEventHandler(this.TxtRegionNumber_KeyDown); this.txtRegionNumber.TextChanged += new System.EventHandler(this.TxtRegionNumber_TextChanged); + // 设置Margin属性确保与lblRegionNumber紧密相连,避免被分割到不同行 + this.txtRegionNumber.Margin = new System.Windows.Forms.Padding(0, 2, 3, 2); // // toolStrip // @@ -246,12 +250,13 @@ namespace JoyD.Windows.CS this.btnNewTempDiff, this.btnLoadTempDiff, this.btnSaveTempDiff}); - // 使用HorizontalStackWithOverflow布局确保控件在同一行,空间不足时显示溢出按钮而非换行 - this.toolStrip.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.HorizontalStackWithOverflow; + // 使用Flow布局允许按钮多行显示 + this.toolStrip.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.Flow; this.toolStrip.Location = new System.Drawing.Point(3, 0); - this.toolStrip.MaximumSize = new System.Drawing.Size(0, 50); + // 增加最大高度以允许多行显示 + this.toolStrip.MaximumSize = new System.Drawing.Size(0, 200); this.toolStrip.MinimumSize = new System.Drawing.Size(100, 50); - // 设置AutoSize为true使工具栏能够自动调整大小 + // 保留AutoSize以确保良好显示 this.toolStrip.AutoSize = true; this.toolStrip.Name = "toolStrip"; this.toolStrip.Padding = new System.Windows.Forms.Padding(5);