zoukankan      html  css  js  c++  java
  • TableLayoutPanel用法

    //

    // tableLayoutPanel1

    //

    this.tableLayoutPanel1.ColumnCount = 1;

    this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));

    this.tableLayoutPanel1.Controls.Add(this.label1, 0, 0);

    this.tableLayoutPanel1.Controls.Add(this.button1, 0, 1);

    this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;

    this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);

    this.tableLayoutPanel1.Name = "tableLayoutPanel1";

    this.tableLayoutPanel1.RowCount = 2;

    this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());

    this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());

    this.tableLayoutPanel1.Size = new System.Drawing.Size(284, 84);

    this.tableLayoutPanel1.TabIndex = 4;

    在TableLayoutPanel中的第一行添加一个Label,在第二行添加一个Button。
     label1可以被显示为多行,而且Winforms自动根据label1的实际宽度,调整了button1的位置

  • 相关阅读:
    《构建之法》第四章的感悟
    单复利软件单元测试
    实验一 操作系统模仿cmd
    <构建之法>第一二三章感悟
    近期工作量统计
    复利计算3.0
    复利运算
    单利运算1
    复利计算6.0
    汉堡包
  • 原文地址:https://www.cnblogs.com/rxie/p/1760821.html
Copyright © 2011-2022 走看看