在tablelayoutpanel中隐藏列 [英] hide column in tablelayoutpanel

查看:999
本文介绍了在tablelayoutpanel中隐藏列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

tablelayoutpanel中的实际问题如下所示
在TableLayoutPanel中如果Dock = Fill且AutoSize = true则最后一列占用所有剩余空间

所以,最后一列比tablelayoutpanel的其他列。我想要所有相同大小的列

我已经提到了一个解决方案,但无法理解

链接是 http://stackoverflow.com/questions/2054667/in-tablelayoutpanel-if-dock-fill -and-autosize-true-then-last-column-row-occu [ ^ ]

现在,我添加一个额外的列,并希望看不见它

但没有直接属性可用,

我试图使列的宽度为零但是,它仍显示列

please如果您对此有所了解,请提供帮助。

actual problem in tablelayoutpanel is as below
In TableLayoutPanel if Dock = Fill and AutoSize = true then last column occupy all remaining space
so, last column is wide than other columns of tablelayoutpanel. I want all columns with same size
I have refer a solution but can't understand
link is http://stackoverflow.com/questions/2054667/in-tablelayoutpanel-if-dock-fill-and-autosize-true-then-last-column-row-occu[^]
now, i add an extra column and want to invisible it
but no direct property is available,
I have tried to make width of column zero but, still it shows the column
please help if you have some idea about this.

推荐答案

这是一个旧线程,但可以帮助其他人。

这很容易实现:



It's an old thread, but may help someone else.
This can be easily achieved:

tableLayout1.ColumnStyles[4].SizeType = SizeType.Absolute;
tableLayout1.ColumnStyles[4].Width = 0;





干杯。



Cheers.


tablelayoutpanel中没有实际的行和列。 TLP是现有控件的扩展,用于控制控件自身绘制的位置。您无法隐藏TLP中的行或列。
There are no actual rows and columns in a tablelayoutpanel. TLP is an extension to existing controls to control where the control paints itself. You cannot hide a row or column in the TLP.


这篇关于在tablelayoutpanel中隐藏列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆