GetPrefferedHeight issue v9 to v11

Posted by: craigreilly on 30 November 2018, 12:04 pm EST

    • Post Options:
    • Link

    Posted 30 November 2018, 12:04 pm EST

    I have attached an example. In v9 this worked fine. This is just a small sample of the spreadsheet.

    Previously, the “get preferred height” worked fine… going only as tall as it needed to, but no less than 25 height per row. The data in the spreadsheet when the form loads is the way it works in v9. Cell height is correct.

    Now in v11, after you click the button - every row gets taller - closer to 200 height. Does it have something to do with merged cells?

    WindowsApp1.zip

  • Posted 30 November 2018, 1:05 pm EST

    Has to do with this on the Department Column:

    Dim textStyleType As New FarPoint.Win.Spread.CellType.GeneralCellType

    textStyleType.TextOrientation = FarPoint.Win.TextOrientation.TextTopDown

    FpSpread1.ActiveSheet.Cells(rowcount, 4).CellType = textStyleType

    FpSpread1.ActiveSheet.Cells(rowcount, 4).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center

    By adding this it seems to be ok.

    textStyleType.WordWrap = True

    textStyleType.Multiline = True

    Just frustrating that it changed from v9 to v11. Perhaps someone considered it a bug before. :slight_smile:

    Sorry for wasting your time.

Need extra support?

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

Learn More

Forum Channels