//添加行 横排

    ++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);

}

TableLayoutPanel 动态添加 行 列的更多相关文章

  1. GridView 动态添加绑定列和模板列

    动态添加绑定列很简单:例如: GridView1.DataSourceID = "SqlDataSource1"; BoundField bf1 = new BoundField( ...

  2. silverlight RadGridView 动态添加数据列

    public void BindFaultGridInfo(IList<HealthStatusApp.Web.Models.FaultMajorModel> list) { rg_Fau ...

  3. js动态添加行和列(table)

    function AddTableRow() { var Table = document.getElementById("NewTable"); //取得自定义的表对象 NewR ...

  4. [Irving] Ext.Net动态添加GridPanel列绑定Checkbox值失败的解决办法

    var grid = X.GetCmp<GridPanel>(vm.GRID_QUOTATIONS_FEEITEM_RANGE_SHOW); grid.AddColumn(Html.X() ...

  5. 动态添加一列到DataTable的第一列

    dt.Columns.Add("ROWNUM", typeof(Int64));dt.Columns["ROWNUM"].SetOrdinal(0);

  6. .NET 后台动态添加GridView列

    BoundField bfColumn1 = new BoundField(); bfColumn1.DataField = "zbcompanyname"; bfColumn1. ...

  7. [转]RDLC报表——动态添加列

    本文转自:http://www.cnblogs.com/pszw/archive/2012/07/19/2599937.html 前言 最近接到一个需求:在给定的数据源中,某(些)列,可能需要单独统计 ...

  8. asp.net动态添加GridView的模板列,并获取列值

    一.动态添加模板列: 1.建立模板列样式: 说明:下边代码可以直接写在aspx文件中,也可以单独建立cs文件:另外,我没有写button.linkButton等控件,意思差不多,不过当需要添加事件时, ...

  9. 后台动态生成GridView列和模版

    考虑到很多数据源是不确定的,所以这时无法在前台设置gridview的表头,需要在后台动态指定并绑定数据. 前台代码如下: <%@ Page Title="主页" Langua ...

随机推荐

  1. Windows下命令行怎样登录MySQL

    直接cmd回车然后 “ mysql -u root -p  ”  登录时出现错误,原来是权限不够 打开cmd时需要以管理员的身份打开 然后继续使用 “ mysql -u root -p ” 还是不行, ...

  2. dom常用操作

    创建节点:document.createElement(元素名), document.createTextNode(文本内容) 添加节点:parent.appendChild(newChild) 移除 ...

  3. DAY6 元组、字典与集合

    一.元组 定义:t1 = (1, 2) # t1 = tuple((1,2)) 特点:有序存储.可存放多个数据.不可变(内部可以包含可变对象,可变对象已久可变) 应用场景:将不允许操作的列表可以转化为 ...

  4. h5设计图尺寸

    640 标准的话 设计图: 640*1136 body,html 背景图的话需要640*1008的 这样才能整屏刚刚好 750 标准的话 设计图: 750*1334 body,html背景图的话,75 ...

  5. 英语发音规则---I字母常见发音组合有哪些

    英语发音规则---I字母常见发音组合有哪些 一.总结 一句话总结: I/y在开音节中发/aɪ/,例如:bite /baɪt/ n. 咬 I/y在闭音节中发 /ɪ/,例如:clinic /'klɪnɪk ...

  6. VSCode汉化

    1.打开VSCode 点击箭头指示地方  在搜索框中输入chinese 然后安装中文简体 2.按住 Ctrl+shift+p 选择配置显示语言 然后会看见下面的样子 添加 "locale&q ...

  7. webForm TO MVC

     

  8. js 获取getElementsTagName()方法返回值的内容

    <div id="news-top" class="section"> <h3>Some title</h3> <di ...

  9. JAVA中经过nginx反向代理获取客户端ip并获取相关坐标等信息

    关于搜狐新浪ip库查询接口的使用 直接输出访客ip及所在城市: <script src="http://pv.sohu.com/cityjson?ie=utf-8" > ...

  10. Ubuntu 16.04+GTX970 黑屏无法安装解决方法

    参考http://www.linuxidc.com/Linux/2017-01/139318.htm http://blog.sciencenet.cn/blog-655584-877622.html ...