14
在Windows窗体中使用TableLayoutPanel。我使用SizeStyles和ColumnStyles作为AutoSize和Percent分别。我需要找出放置特定控件的单元格的绝对高度和宽度。获取Windows窗体中TableLayoutPanel单元的高度和宽度
TableLayoutPanelCellPosition pos = tableLayoutPanel1.GetCellPosition(button1);
int height = (int)tableLayoutPanel1.RowStyles[pos.Row].Height;
int width = (int)tableLayoutPanel1.ColumnStyles[pos.Column].Width;
上面,我得到的高度为0. RowStyle与SizeType作为AutoSize。 同样,我得到33.33。 ColumnStyle设置为SizeType为Percent和Size = 33.33。
我需要获得单元像素的绝对大小。
我不知道这是可能隐藏从智能感知功能,非常感谢! – farukdgn
@farukdgn请参阅[BrowsableAttribute类](https://msdn.microsoft.com/en-us/library/system.componentmodel.browsableattribute(v = vs.110).aspx) – LarsTech
隐藏函数的要点是什么那里? – farukdgn