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的位置

  • 相关阅读:
    Doing Homework 简单dp&&状态压缩
    嫖裤子序列
    王宁宁宁
    友军寻路法
    Viviani
    ccf 201909-3
    ccf 201909-5
    链式前向星
    ccf-201909-04
    ccf -201909-2
  • 原文地址:https://www.cnblogs.com/rxie/p/1760821.html
Copyright © 2011-2022 走看看