Posted 8 September 2017, 1:24 pm EST
GetPreferredWidth is not checking header width in 4.0. I have some custom headers that are longer than default column width of 60 pixels. Text in these cells does not fit in the width returned by GetPreferredWidth.
I did find a post here about creating a new ColumnHeaderRenderer and setting WordWrap to false as follows:
ColumnHeaderRenderer c = new ColumnHeaderRenderer();
I tried this code, and it did fix the with problem. However, I want the new color styles in Spread 4.0. The above code reverts the background to battleship grey.
How can I keep the nice new automatic styles in Spread 4 and fix my column width issue?