• TableLayoutPanel 动态添加 行 列


          //添加行 横排

        ++this.tbPnl.RowCount;

                this.tbPnl.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));

     

                ++this.tbPnl.RowCount;

                this.tbPnl.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));

               

                ++this.tbPnl.RowCount;

                this.tbPnl.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));           

        //添加列 竖排 

                ++this.tbPnl.ColumnCount;

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

     

              

                

                foreach (IPlugin plugin in plugins)

                {

                    Label a = new Label();

                    a.Text =plugin.Text;

                    a.Anchor = System.Windows.Forms.AnchorStyles.None;

                    this.tbPnl.Controls.Add(a, 0, 0);

                }

  • 相关阅读:
    辣条君写爬虫1【贝壳房价爬取】
    如何在 Windows 上创建一个新的 GPG key
    Protocol Buffers 开发者指南
    Docsify 的边栏目录如何设置
    Docker 容器的网络
    Discourse 如何添加 Google Analytics GA4 代码
    Docker 引擎
    Docker 引擎
    Docker 引擎
    Docker 引擎概述
  • 原文地址:https://www.cnblogs.com/z45281625/p/10671661.html
Copyright © 2020-2023  润新知