瀏覽代碼

处理颗粒列表筛选下拉表显示不全的bug

cxs 7 月之前
父節點
當前提交
9c0a8abbb3

+ 2 - 1
OTSIncAReportApp/1-UI/Control_Grids/ParticlesGridDevidePage/ParticleClassificationSelect.Designer.cs

@@ -37,10 +37,11 @@ namespace OTSIncAReportApp._1_UI.Control_Grids.ParticlesGridDevidePage
             // 
             // panel1
             // 
+            this.panel1.AutoScroll = true;
             this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
             this.panel1.Location = new System.Drawing.Point(2, 3);
             this.panel1.Name = "panel1";
-            this.panel1.Size = new System.Drawing.Size(264, 507);
+            this.panel1.Size = new System.Drawing.Size(264, 505);
             this.panel1.TabIndex = 0;
             // 
             // btn_ok

+ 12 - 2
OTSIncAReportApp/1-UI/Control_Grids/ParticlesGridDevidePage/ParticleClassificationSelect.cs

@@ -8,6 +8,7 @@ using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
 using System.Windows.Forms;
+using static DevExpress.Diagram.Core.Native.Either;
 
 namespace OTSIncAReportApp._1_UI.Control_Grids.ParticlesGridDevidePage
 {
@@ -30,6 +31,12 @@ namespace OTSIncAReportApp._1_UI.Control_Grids.ParticlesGridDevidePage
         private void ParticleClassificationSelect_Load(object sender, EventArgs e)
         {
             DataTable table = Particledata.GetClassificationOfAllParticles();
+            //for (int i = 0; i < 30; i++)
+            //{
+            //    DataRow row = table.NewRow();
+            //    row["TypeName"] = "aa" + i.ToString();
+            //    table.Rows.Add(row);
+            //}
             if (table != null)
             {
                 if (table.Rows.Count > 0)
@@ -39,14 +46,17 @@ namespace OTSIncAReportApp._1_UI.Control_Grids.ParticlesGridDevidePage
                     flowLayoutPanel.WrapContents = true;
                     flowLayoutPanel.Dock = DockStyle.Fill;
                     flowLayoutPanel.AutoScroll = true;
-                    flowLayoutPanel.Padding = new Padding(15);
+                    flowLayoutPanel.Padding = new Padding(20, 10, 20, 25);
                     panel1.Controls.Add(flowLayoutPanel);
                     foreach (DataRow it in table.Rows)
                     {
                         // 添加控件到 FlowLayoutPanel 中
                         CheckBox box1 = new CheckBox();
                         box1.Text = it["TypeName"].ToString();
-                        box1.Width = flowLayoutPanel.Width-30;
+                        box1.Width = flowLayoutPanel.Width-40;
+                        box1.Height = 25;
+                        Font font= new Font("宋体", 15, FontStyle.Regular);
+                        box1.Font = font;
                         if (ParticleClassificationSelectedList != null)
                         {
                             if (ParticleClassificationSelectedList.Contains(box1.Text))