且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

获取的高度和宽度的TableLayoutPanel单元格的Windows窗体

更新时间:2023-12-06 10:33:22

对于一些奇怪的原因,微软决定从智能感知隐藏这些功能。

For some odd reason, Microsoft decided to hide those functions from intellisense.

这应该是写:

  TableLayoutPanelCellPosition pos = tableLayoutPanel1.GetCellPosition(button1);
  int width = tableLayoutPanel1.GetColumnWidths()[pos.Column];
  int height = tableLayoutPanel1.GetRowHeights()[pos.Row];