WordWrap is not working fine

Posted by: luigggye-fp on 8 September 2017, 2:15 pm EST

  • Posted 8 September 2017, 2:15 pm EST


    Please, see the attached sample and you will see that the header of the column "C" is bad formated. (The word "Responsaveis" was separated in to lines).

    Following the code I am using for this.

    Could you help me please?

    Thanks in advance,

    <FONT size=2>

    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>Dim</FONT></FONT><FONT size=2> HeaderCellFormatWrapped </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>As</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>New</FONT></FONT><FONT size=2> FarPoint.Win.Spread.CellType.GeneralCellType

    HeaderCellFormatWrapped.WordWrap = </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>True</FONT></FONT>

    <FONT color=#0000ff size=2><FONT color=#0000ff size=2><FONT size=2>

    FP.ActiveSheet.ColumnHeader.Cells(2, 1, FP.ActiveSheet.ColumnHeader.RowCount - 1, LastCol).CellType = HeaderCellFormatWrapped


  • Replied 8 September 2017, 2:15 pm EST


    In order to not to allow word wrap for column header you need to set WordWrap property to false.e.g.

            Dim gen As New FarPoint.Win.Spread.CellType.TextCellType
            gen.WordWrap = False
            FpSpread1.ActiveSheet.ColumnHeader.Cells(0, 1).CellType = gen
            FpSpread1.ActiveSheet.ColumnHeader.Cells(0, 1).Text = "Responsaveis"

    The word "Responsaveis" was not separated in two lines. I hope it will help you.




Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels