Replied 8 September 2017, 12:37 pm EST
Here is what one of the developers had to say about the issue...
He is making two mistakes in his code.
First, he is adding a pixel for the grid lines when the grid lines are already included in the row heights and column widths. Thus, he needs to remove the following lines...
w = w + 1 'for gridlines
h = h + 1 'for gridlines
Second, he is forgetting about the control's border which is included in the control's Width and Height properties. Thus, he needs to add the border size to the control's new width and height...
if (fpSpread1.BorderStyle == BorderStyle.Fixed3D)
b = SystemInformation.Border3DSize;
else if (fpSpread1.BorderStyle == BorderStyle.FixedSingle)
b = SystemInformation.BorderSize;
b = new Size(0,0);
fpSpread1.Width = w + vs + 2 * b.Width;
fpSpread1.Height = Math.Min(h + hs + 2 * b.Height, 98);
Note that you have to double the border size since the border is on both the left and right (or top and bottom) of the control.