C# 删除TableLayoutPanel中的行会导致布局问题

C# 删除TableLayoutPanel中的行会导致布局问题,c#,winforms,user-controls,tablelayoutpanel,C#,Winforms,User Controls,Tablelayoutpanel,我有一个WinForms应用程序,它有一个TableLayoutPanel;这是定义代码: tableLayoutPanel1 = new TableLayoutPanel(); tableLayoutPanel1.Dock = DockStyle.Fill; tableLayoutPanel1.AutoScroll = true; tableLayoutPanel1.RowCount = users.Count + 1; tableLayoutPanel1.ColumnCount = 1;

我有一个WinForms应用程序,它有一个
TableLayoutPanel
;这是定义代码:

tableLayoutPanel1 = new TableLayoutPanel();
tableLayoutPanel1.Dock = DockStyle.Fill;
tableLayoutPanel1.AutoScroll = true;

tableLayoutPanel1.RowCount = users.Count + 1;
tableLayoutPanel1.ColumnCount = 1;
tableLayoutPanel1.GrowStyle = TableLayoutPanelGrowStyle.FixedSize;
tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F));

foreach (String user in users)
{
    tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 600F));
}
tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 600F));

int index = 0;
foreach (String user in users)
{
    AddDockedControl(index, user);
    index++;
}
AddDockedControl(index, null);

panel1.Controls.Add(tableLayoutPanel1);

private void AddDockedControl(int row, String userName)
{
    AccountRowUC newUser = new AccountRowUC(this, userName, row);
    newUser.BorderStyle = BorderStyle.FixedSingle;
    newUser.Dock = DockStyle.Top;
    tableLayoutPanel1.Controls.Add(newUser, 0, row);
}
现在,当我想删除其中一行时,我使用以下代码:

public void RemoveRowAtIndex(int index)
{
    if (index >= tableLayoutPanel1.RowCount)
        return;

    // delete all controls of row that we want to delete
    for (int i = 0; i < tableLayoutPanel1.ColumnCount; i++)
    {
        var control = tableLayoutPanel1.GetControlFromPosition(i, index);
        tableLayoutPanel1.Controls.Remove(control);
    }

    // move up row controls that comes after row we want to remove
    for (int i = index + 1; i < tableLayoutPanel1.RowCount; i++)
    {
        for (int j = 0; j < tableLayoutPanel1.ColumnCount; j++)
        {
            var control = tableLayoutPanel1.GetControlFromPosition(j, i);
            if (control != null)
                tableLayoutPanel1.SetRow(control, i - 1);
        }
    }

    // remove last row

    tableLayoutPanel1.RowStyles.RemoveAt(tableLayoutPanel1.RowCount - 1);
    //tableLayoutPanel1.RowStyles.RemoveAt(index);
    tableLayoutPanel1.RowCount--;
}
public void removitorowatinex(int索引)
{
如果(索引>=tableLayoutPanel1.RowCount)
返回;
//删除要删除的行的所有控件
对于(int i=0;i

问题是,当我删除一行时,表的底部会留下一个很大的空间:TableLayoutPanel不会回收
panel1

一个基于评论中描述的布局和之前发布的回答的解决方案:

说明:
(本文底部提供了测试表格的完整代码)

  • 创建一个新表单(此处名为
    frmTLPTest1
  • 添加两个面板。一个用于承载一些按钮,另一个将是TableLayoutPanel的容器
  • 将容器面板设置为
    AutoScroll=true
    AutoSizeMode=AutoSizeMode.growtandshrink
    ,设置所有定位点(左、上、右、下)
  • 在Container面板内,放置一个新的TableLayoutPanel:将其设置为
    AutoSizeMode=true
    AutoSizeMode=AutoSizeMode.growtandShrink
    Dock=DockStyle.Top
  • 从TableLayoutPanel中删除除一行和一列之外的所有行和列(不能全部删除)。将两者的尺寸设置为
    自动调整大小
    重要注意事项(也在链接答案中报告):

    在表单构造函数中,删除其中一个行样式。这是 重要提示:TLP将保留2种赛艇样式。一个应用于 现有行;第二种样式将应用于您选择的第一行 添加:仅添加到第一个,而不是其他。如果不是这种风格 如果删除,则会影响布局

    用于向TableLayoutPanel添加行或从TableLayoutPanel中删除行的核心方法使用FlowLayoutPanel作为TLP行内容,并且最终还可以用作其他控件的容器

    TlpAddRow(TableLayoutPanel tlp,bool addRowCount)
    方法:
    将新的FlowLayoutPanel添加到指定的TableLayoutPanel的单元格中,并在请求时添加新行。
    由于设计器不允许删除所有行,因此第一行(FlowLayoutPanel)不能增加行数:
    addRowCount
    参数将设置为
    false

    private Control TlpAddRow(TableLayoutPanel tlp, bool addRowCount)
    {
        var flp = new FlowLayoutPanel() {
            Anchor = AnchorStyles.Top | AnchorStyles.Bottom,
            AutoSize = true,
            AutoSizeMode = AutoSizeMode.GrowAndShrink,
        };
    
        tlp.SuspendLayout();
        if (addRowCount) tlp.RowCount += 1;
        tlp.Controls.Add(flp, 0, tlp.RowCount - 1);
        tlp.ResumeLayout(true);
        return flp;
    }
    
    TLPRemoveRow(TableLayoutPanel tlp,控件控制)
    方法(重载):

    允许从指定的TableLayoutPanel中删除行。要删除的行可以从用作行容器的控件派生(此处为FlowLayoutPanel,但它可以是一个面板、另一个TableLayoutPanel或其他类型的容器控件)。
    也可以通过直接指定行索引来删除该行

    private void TLPRemoveRow(TableLayoutPanel tlp, Control control)
    {
        int ctlRow = this.tlp1.GetRow(control);
        TLPRemoveRow(tlp, ctlRow);
    }
    
    private void TLPRemoveRow(TableLayoutPanel tlp, int row)
    {
        if (row < this.tlp1.RowCount - 1) {
            for (int i = row; i < this.tlp1.RowCount - 1; i++) {
                tlp.SetRow(tlp.GetControlFromPosition(0, i + 1), i);
            }
        }
        tlp.RowCount -= 1;
    }
    
    测试表单设计器

    partial class frmTLPTest1
    {
        private System.ComponentModel.IContainer components = null;
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null)) {
                components.Dispose();
            }
            base.Dispose(disposing);
        }
    
        private void InitializeComponent()
        {
            this.panToolbar = new System.Windows.Forms.Panel();
            this.btnRemoveRow = new System.Windows.Forms.Button();
            this.chkRandom = new System.Windows.Forms.CheckBox();
            this.btnRemoveControl = new System.Windows.Forms.Button();
            this.btnAddControl = new System.Windows.Forms.Button();
            this.panBackground = new System.Windows.Forms.Panel();
            this.tlp1 = new System.Windows.Forms.TableLayoutPanel();
            this.panToolbar.SuspendLayout();
            this.panBackground.SuspendLayout();
            this.SuspendLayout();
            // 
            // panToolbar
            // 
            this.panToolbar.BackColor = System.Drawing.Color.DarkOliveGreen;
            this.panToolbar.Controls.Add(this.btnRemoveRow);
            this.panToolbar.Controls.Add(this.chkRandom);
            this.panToolbar.Controls.Add(this.btnRemoveControl);
            this.panToolbar.Controls.Add(this.btnAddControl);
            this.panToolbar.Dock = System.Windows.Forms.DockStyle.Bottom;
            this.panToolbar.Location = new System.Drawing.Point(0, 359);
            this.panToolbar.Name = "panToolbar";
            this.panToolbar.Size = new System.Drawing.Size(552, 55);
            this.panToolbar.TabIndex = 2;
            // 
            // btnRemoveRow
            // 
            this.btnRemoveRow.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32)))));
            this.btnRemoveRow.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(64)))), ((int)(((byte)(0)))));
            this.btnRemoveRow.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(64)))), ((int)(((byte)(0)))));
            this.btnRemoveRow.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.btnRemoveRow.ForeColor = System.Drawing.Color.White;
            this.btnRemoveRow.Location = new System.Drawing.Point(261, 11);
            this.btnRemoveRow.Name = "btnRemoveRow";
            this.btnRemoveRow.Size = new System.Drawing.Size(119, 34);
            this.btnRemoveRow.TabIndex = 4;
            this.btnRemoveRow.Text = "Remove Row";
            this.btnRemoveRow.UseVisualStyleBackColor = false;
            this.btnRemoveRow.Click += new System.EventHandler(this.btnRemoveRow_Click);
            // 
            // chkRandom
            // 
            this.chkRandom.AutoSize = true;
            this.chkRandom.ForeColor = System.Drawing.Color.White;
            this.chkRandom.Location = new System.Drawing.Point(446, 20);
            this.chkRandom.Name = "chkRandom";
            this.chkRandom.Size = new System.Drawing.Size(94, 19);
            this.chkRandom.TabIndex = 3;
            this.chkRandom.Text = "Random Size";
            this.chkRandom.UseVisualStyleBackColor = true;
            // 
            // btnRemoveControl
            // 
            this.btnRemoveControl.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32)))));
            this.btnRemoveControl.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(64)))), ((int)(((byte)(0)))));
            this.btnRemoveControl.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(64)))), ((int)(((byte)(0)))));
            this.btnRemoveControl.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.btnRemoveControl.ForeColor = System.Drawing.Color.White;
            this.btnRemoveControl.Location = new System.Drawing.Point(136, 11);
            this.btnRemoveControl.Name = "btnRemoveControl";
            this.btnRemoveControl.Size = new System.Drawing.Size(119, 34);
            this.btnRemoveControl.TabIndex = 2;
            this.btnRemoveControl.Text = "Remove Control";
            this.btnRemoveControl.UseVisualStyleBackColor = false;
            this.btnRemoveControl.Click += new System.EventHandler(this.btnRemoveControl_Click);
            // 
            // btnAddControl
            // 
            this.btnAddControl.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32)))));
            this.btnAddControl.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(64)))), ((int)(((byte)(0)))));
            this.btnAddControl.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(64)))), ((int)(((byte)(0)))));
            this.btnAddControl.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.btnAddControl.ForeColor = System.Drawing.Color.White;
            this.btnAddControl.Location = new System.Drawing.Point(11, 11);
            this.btnAddControl.Name = "btnAddControl";
            this.btnAddControl.Size = new System.Drawing.Size(119, 34);
            this.btnAddControl.TabIndex = 0;
            this.btnAddControl.Text = "Add Control";
            this.btnAddControl.UseVisualStyleBackColor = false;
            this.btnAddControl.Click += new System.EventHandler(this.btnAddControl_Click);
            // 
            // panBackground
            // 
            this.panBackground.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
            | System.Windows.Forms.AnchorStyles.Left) 
            | System.Windows.Forms.AnchorStyles.Right)));
            this.panBackground.AutoScroll = true;
            this.panBackground.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
            this.panBackground.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32)))));
            this.panBackground.Controls.Add(this.tlp1);
            this.panBackground.Location = new System.Drawing.Point(0, 0);
            this.panBackground.Name = "panBackground";
            this.panBackground.Size = new System.Drawing.Size(552, 360);
            this.panBackground.TabIndex = 3;
            // 
            // tlp1
            // 
            this.tlp1.AutoSize = true;
            this.tlp1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
            this.tlp1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32)))));
            this.tlp1.CellBorderStyle = System.Windows.Forms.TableLayoutPanelCellBorderStyle.Single;
            this.tlp1.ColumnCount = 1;
            this.tlp1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
            this.tlp1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
            this.tlp1.Dock = System.Windows.Forms.DockStyle.Top;
            this.tlp1.Location = new System.Drawing.Point(0, 0);
            this.tlp1.Name = "tlp1";
            this.tlp1.RowCount = 1;
            this.tlp1.RowStyles.Add(new System.Windows.Forms.RowStyle());
            this.tlp1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 1F));
            this.tlp1.Size = new System.Drawing.Size(552, 2);
            this.tlp1.TabIndex = 4;
            // 
            // frmTLPTest1
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
            this.ClientSize = new System.Drawing.Size(552, 414);
            this.Controls.Add(this.panBackground);
            this.Controls.Add(this.panToolbar);
            this.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.Name = "frmTLPTest1";
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            this.Text = "frmTLPTest1";
            this.Load += new System.EventHandler(this.SOfrmTest1_Load);
            this.panToolbar.ResumeLayout(false);
            this.panToolbar.PerformLayout();
            this.panBackground.ResumeLayout(false);
            this.panBackground.PerformLayout();
            this.ResumeLayout(false);
    
        }
    
        private System.Windows.Forms.Panel panToolbar;
        private System.Windows.Forms.Button btnAddControl;
        private System.Windows.Forms.Button btnRemoveControl;
        private System.Windows.Forms.CheckBox chkRandom;
        private System.Windows.Forms.Panel panBackground;
        private System.Windows.Forms.TableLayoutPanel tlp1;
        private System.Windows.Forms.Button btnRemoveRow;
    }
    

    TLP在停靠到
    Fill
    时,滚动条(来自
    ScrollableControl
    )有一些困难。滚动条不会更新为当前的
    PreferredSize
    值。使用停靠面板(设置为AutoScroll)作为TLP父级,将TLP设置为
    AutoSize
    GrowtandShrink
    ,将其停靠在
    Top
    而不是
    Fill
    ,可能更容易。面板将在需要时移除滚动条。顺便问一下,如何使用
    .GrowStyle=TableLayoutPanelGrowStyle.FixedSize?查看此测试:(答案实际上使用了一个TLP,行内有FlowLayoutPanels)。@Jimi我将
    GrowthStyle
    更改为
    AddRows
    ,你有什么建议的例子吗?是的,我可以修改我在前面的评论中链接的示例,并添加两个方法(RemoveRow/AddRow),可以直接访问,以显示如何按照所述方式完成此操作。
    partial class frmTLPTest1
    {
        private System.ComponentModel.IContainer components = null;
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null)) {
                components.Dispose();
            }
            base.Dispose(disposing);
        }
    
        private void InitializeComponent()
        {
            this.panToolbar = new System.Windows.Forms.Panel();
            this.btnRemoveRow = new System.Windows.Forms.Button();
            this.chkRandom = new System.Windows.Forms.CheckBox();
            this.btnRemoveControl = new System.Windows.Forms.Button();
            this.btnAddControl = new System.Windows.Forms.Button();
            this.panBackground = new System.Windows.Forms.Panel();
            this.tlp1 = new System.Windows.Forms.TableLayoutPanel();
            this.panToolbar.SuspendLayout();
            this.panBackground.SuspendLayout();
            this.SuspendLayout();
            // 
            // panToolbar
            // 
            this.panToolbar.BackColor = System.Drawing.Color.DarkOliveGreen;
            this.panToolbar.Controls.Add(this.btnRemoveRow);
            this.panToolbar.Controls.Add(this.chkRandom);
            this.panToolbar.Controls.Add(this.btnRemoveControl);
            this.panToolbar.Controls.Add(this.btnAddControl);
            this.panToolbar.Dock = System.Windows.Forms.DockStyle.Bottom;
            this.panToolbar.Location = new System.Drawing.Point(0, 359);
            this.panToolbar.Name = "panToolbar";
            this.panToolbar.Size = new System.Drawing.Size(552, 55);
            this.panToolbar.TabIndex = 2;
            // 
            // btnRemoveRow
            // 
            this.btnRemoveRow.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32)))));
            this.btnRemoveRow.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(64)))), ((int)(((byte)(0)))));
            this.btnRemoveRow.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(64)))), ((int)(((byte)(0)))));
            this.btnRemoveRow.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.btnRemoveRow.ForeColor = System.Drawing.Color.White;
            this.btnRemoveRow.Location = new System.Drawing.Point(261, 11);
            this.btnRemoveRow.Name = "btnRemoveRow";
            this.btnRemoveRow.Size = new System.Drawing.Size(119, 34);
            this.btnRemoveRow.TabIndex = 4;
            this.btnRemoveRow.Text = "Remove Row";
            this.btnRemoveRow.UseVisualStyleBackColor = false;
            this.btnRemoveRow.Click += new System.EventHandler(this.btnRemoveRow_Click);
            // 
            // chkRandom
            // 
            this.chkRandom.AutoSize = true;
            this.chkRandom.ForeColor = System.Drawing.Color.White;
            this.chkRandom.Location = new System.Drawing.Point(446, 20);
            this.chkRandom.Name = "chkRandom";
            this.chkRandom.Size = new System.Drawing.Size(94, 19);
            this.chkRandom.TabIndex = 3;
            this.chkRandom.Text = "Random Size";
            this.chkRandom.UseVisualStyleBackColor = true;
            // 
            // btnRemoveControl
            // 
            this.btnRemoveControl.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32)))));
            this.btnRemoveControl.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(64)))), ((int)(((byte)(0)))));
            this.btnRemoveControl.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(64)))), ((int)(((byte)(0)))));
            this.btnRemoveControl.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.btnRemoveControl.ForeColor = System.Drawing.Color.White;
            this.btnRemoveControl.Location = new System.Drawing.Point(136, 11);
            this.btnRemoveControl.Name = "btnRemoveControl";
            this.btnRemoveControl.Size = new System.Drawing.Size(119, 34);
            this.btnRemoveControl.TabIndex = 2;
            this.btnRemoveControl.Text = "Remove Control";
            this.btnRemoveControl.UseVisualStyleBackColor = false;
            this.btnRemoveControl.Click += new System.EventHandler(this.btnRemoveControl_Click);
            // 
            // btnAddControl
            // 
            this.btnAddControl.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32)))));
            this.btnAddControl.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(64)))), ((int)(((byte)(0)))));
            this.btnAddControl.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(64)))), ((int)(((byte)(0)))));
            this.btnAddControl.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.btnAddControl.ForeColor = System.Drawing.Color.White;
            this.btnAddControl.Location = new System.Drawing.Point(11, 11);
            this.btnAddControl.Name = "btnAddControl";
            this.btnAddControl.Size = new System.Drawing.Size(119, 34);
            this.btnAddControl.TabIndex = 0;
            this.btnAddControl.Text = "Add Control";
            this.btnAddControl.UseVisualStyleBackColor = false;
            this.btnAddControl.Click += new System.EventHandler(this.btnAddControl_Click);
            // 
            // panBackground
            // 
            this.panBackground.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
            | System.Windows.Forms.AnchorStyles.Left) 
            | System.Windows.Forms.AnchorStyles.Right)));
            this.panBackground.AutoScroll = true;
            this.panBackground.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
            this.panBackground.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32)))));
            this.panBackground.Controls.Add(this.tlp1);
            this.panBackground.Location = new System.Drawing.Point(0, 0);
            this.panBackground.Name = "panBackground";
            this.panBackground.Size = new System.Drawing.Size(552, 360);
            this.panBackground.TabIndex = 3;
            // 
            // tlp1
            // 
            this.tlp1.AutoSize = true;
            this.tlp1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
            this.tlp1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32)))));
            this.tlp1.CellBorderStyle = System.Windows.Forms.TableLayoutPanelCellBorderStyle.Single;
            this.tlp1.ColumnCount = 1;
            this.tlp1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
            this.tlp1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
            this.tlp1.Dock = System.Windows.Forms.DockStyle.Top;
            this.tlp1.Location = new System.Drawing.Point(0, 0);
            this.tlp1.Name = "tlp1";
            this.tlp1.RowCount = 1;
            this.tlp1.RowStyles.Add(new System.Windows.Forms.RowStyle());
            this.tlp1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 1F));
            this.tlp1.Size = new System.Drawing.Size(552, 2);
            this.tlp1.TabIndex = 4;
            // 
            // frmTLPTest1
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
            this.ClientSize = new System.Drawing.Size(552, 414);
            this.Controls.Add(this.panBackground);
            this.Controls.Add(this.panToolbar);
            this.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.Name = "frmTLPTest1";
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            this.Text = "frmTLPTest1";
            this.Load += new System.EventHandler(this.SOfrmTest1_Load);
            this.panToolbar.ResumeLayout(false);
            this.panToolbar.PerformLayout();
            this.panBackground.ResumeLayout(false);
            this.panBackground.PerformLayout();
            this.ResumeLayout(false);
    
        }
    
        private System.Windows.Forms.Panel panToolbar;
        private System.Windows.Forms.Button btnAddControl;
        private System.Windows.Forms.Button btnRemoveControl;
        private System.Windows.Forms.CheckBox chkRandom;
        private System.Windows.Forms.Panel panBackground;
        private System.Windows.Forms.TableLayoutPanel tlp1;
        private System.Windows.Forms.Button btnRemoveRow;
    }