Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
150
Silverlight => Infragistics.Excel => How to set Height and Width of WorksheetCell.Comment..which is of type WorksheetCellComment
posted

I am creating comment with following code.

cell.Comment = new WorksheetCellComment()

                                {

                                    Text = new FormattedString("Some Text"),

                                };

where cell is WorksheetCell.

With this code i is creating some default Height and Width for the Comment in Excel. I want to change the Height and Width of Comment. How can i achieve that.?

Thanks.

  • 44743
    Verified Answer
    posted

    You can do something like this to change the comment's size:

    Rectangle commentBounds = cell.Comment.GetBoundsInTwips();
    commentBounds.Height = 3000;
    commentBounds.Width = 1500;
    cell.Comment.SetBoundsInTwips(cell.Worksheet, commentBounds);