就像comboBox控件一样.无法设置其高度
解决方案 »
- c# WINFORM Label.Text动态赋值问题!
- 求教, 子窗体 ShowDialog(), 结果其他所有窗体都被锁定, 无法操作
- vs2008 Add=> new Item=> SqlServer Database 的mdf文件问题
- IE7 中菜单栏和Toolbar在一起烦死了
- 问一下。在WINFROM中,如何保存图片。。是SQL数据库。
- 最近困扰我好久的一个问题
- 文本框问题
- GDI的问题
- DataGrid的Datasource的表不改,只是表中的列改了,可增加的列却为何不显示?
- Predicate<TSource> match
- 如何编程实现把一个dbf文件中的数据导出到SQL Server的一个表中?
- 关于listView控件的问题?
下面的代码示例重写 SetBoundsCore 方法,以确保控件保持固定的大小。该示例要求有从 Control 类直接或间接派生的类。C#
protected override void SetBoundsCore(int x, int y,
int width, int height, BoundsSpecified specified)
{
// Set a fixed height and width for the control.
base.SetBoundsCore(x, y, 150, 75, specified);
}
同理,只固定高度的话,将width放回调用处即可
我这样写,好像不起作用.TO:storm97(风暴不再)
效率太低.
if( Height!=xxx ) Height=xxx ;