ARTICLE AD BOX
I want to control whether there is a border line between the cells in a TableLayoutPanel, much like I can do in an Excel table.
To begin with, I set my CellBorderStyle to None as suggested in Draw only outer border for TableLayoutPanel Cells. One issue with that is it moves the cells closer together. You can see that by toggling CellBorderStyle in the VisualStudio designer. So, I'm wondering if part of the solution I need involves leaving the CellBorderStyle as Single, but then painting over the system-drawn border line with a line the same color as the cell background.
Beyond that, I have used all the approaches given as answers in the previous question and in Draw borders around some cells in a tablelayoutpanel. That is, I've tried e.Graphics.DrawLine(Pens.Black, topLeft, topRight), e.Graphics.DrawRectangle(new Pen(Color.Blue), e.CellBounds), and ControlPaint.DrawBorder(e.Graphics, rectangle, Color.Red, ButtonBorderStyle.Single). All of these resulted in a much thicker line than is drawn by the system. You can see it here:

Does anyone know what the implementation of TableLayoutPanel uses to paint its thin border lines? From looking at the source to TableLayoutPanel.cs, it appears it is calling ControlPaint.PaintTableCellBorder(cellBorderStyle, graphics, bound), but that isn't an exposed method of ControlPaint. I was finally able to step into a ControlPaint method which allows me to view the source for PaintTableCellBorder. It calls e.Graphics.DrawRectangle(SystemPens.ControlDark, e.CellBounds), which also results in a too thick line when I call it directly. Is there some magic here I'm missing?
