Search code examples
c#.netwinformscelltablelayoutpanel

How to get the left location of a cell in a TableLayoutPanel in pixels on form?


How can i get the left location of a cell in a TableLayoutPanel in pixels on form in C# WinForms .Net v2.0?

Edit: I have seen this but it only has Width and Height.


Solution

  • I added the Widths of every cell to get the Left of a specific cell using this code:

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