码迷,mamicode.com
首页 > 其他好文 > 详细

tableLayoutPanel 列宽度设置

时间:2017-07-08 00:20:40      阅读:210      评论:0      收藏:0      [点我收藏+]

标签:[1]   control   this   blog   cli   span   ble   out   art   

 1   public partial class UserControl1 : UserControl
 2     {
 3         public UserControl1()
 4         {
 5             InitializeComponent();
 6             this.tableLayoutPanel1.ColumnStyles[1].Width = 0;
 7         }
 8         //显示
 9         private void toolStripButton1_Click(object sender, EventArgs e)
10         {
11             this.tableLayoutPanel1.ColumnStyles[1].Width = this.tableLayoutPanel1.ColumnStyles[0].Width;
12             this.Refresh(); 
13         }
14       //隐藏
15         private void toolStripDropDownButton1_Click(object sender, EventArgs e)
16         {
17             this.tableLayoutPanel1.ColumnStyles[1].Width = 0;
18 
19         }
20     }

 

 this.tableLayoutPanel1.ColumnStyles[1] 为第二列  , 0为第一列

tableLayoutPanel 列宽度设置

标签:[1]   control   this   blog   cli   span   ble   out   art   

原文地址:http://www.cnblogs.com/endv/p/7134545.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!