Posted 20 March 2019, 8:41 pm EST - Updated 30 September 2022, 4:57 am EST
Hi,
I have a problem when setting the height of the first row of the column header in my spread control.
The row contains multiple columns, each cell with multiple lines and word wrap enabled since the width is fixed (also calculated by using TextMeasure because I get the same problem with the columns width).
I have tried this:
MySpread.ActiveSheet.ColumnHeader.Rows(0).Height = MySpread.ActiveSheet.ColumnHeader.Rows(0).GetPreferredHeight()
but this gives more padding to the cells even for the one containing the longest text.
Note that our version of Spread.NET is 6.0.2005.2008 because its an old project that we are porting to VB.NET but client hasn’t updated yet to a more recent version of the library.
Below I have attached a picture of the actual result and what the client wants.
How can I remove the blue zones and get only the minimum size for the text displayed in the cell?
Thanks.