修改toolStrip布局样式为HorizontalStackWithOverflow,确保lblRegionNumber和txtRegionNumber控件不被拆分到两行

This commit is contained in:
zqm
2025-11-11 15:24:41 +08:00
parent 8a1f5f6a20
commit 85319b5405

View File

@@ -246,10 +246,13 @@ namespace JoyD.Windows.CS
this.btnNewTempDiff,
this.btnLoadTempDiff,
this.btnSaveTempDiff});
this.toolStrip.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.Flow;
// 使用HorizontalStackWithOverflow布局确保控件在同一行空间不足时显示溢出按钮而非换行
this.toolStrip.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.HorizontalStackWithOverflow;
this.toolStrip.Location = new System.Drawing.Point(3, 0);
this.toolStrip.MaximumSize = new System.Drawing.Size(0, 100);
this.toolStrip.MaximumSize = new System.Drawing.Size(0, 50);
this.toolStrip.MinimumSize = new System.Drawing.Size(100, 50);
// 设置AutoSize为true使工具栏能够自动调整大小
this.toolStrip.AutoSize = true;
this.toolStrip.Name = "toolStrip";
this.toolStrip.Padding = new System.Windows.Forms.Padding(5);
this.toolStrip.Size = new System.Drawing.Size(247, 50);