【问题标题】:How to get the left location of a cell in a TableLayoutPanel in pixels on form?如何在表格上以像素为单位获取 TableLayoutPanel 中单元格的左侧位置?
【发布时间】:2014-10-05 07:54:51
【问题描述】:

如何在 C# WinForms .Net v2.0 中以像素为单位获取TableLayoutPanel 中单元格的左侧位置

编辑:我见过this,但它只有WidthHeight

【问题讨论】:

    标签: c# .net winforms cell tablelayoutpanel


    【解决方案1】:

    我添加了每个单元格的Widths 以获得使用此代码的特定单元格的Left

    int left = 0;
    for(int i = 0; i < theCellIndex; i++)
      left += tableLayoutPanel1.GetColumnWidths()[i];
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-05-29
      • 1970-01-01
      • 1970-01-01
      • 2010-10-14
      • 2011-06-27
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多