Comment.TextVerticalAlignment
Comment.TextVerticalAlignment property
Gets and sets the text vertical alignment type of the comment.
public TextAlignmentType TextVerticalAlignment { get; set; }
Examples
using System;
using Aspose.Cells;
namespace AsposeCellsExamples
{
public class CommentPropertyTextVerticalAlignmentDemo
{
public static void Run()
{
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets[0];
int commentIndex = worksheet.Comments.Add("B3");
Comment comment = worksheet.Comments[commentIndex];
comment.Note = "Sample comment text";
// Set vertical alignment to Fill
comment.TextVerticalAlignment = TextAlignmentType.Fill;
Console.WriteLine("Vertical Alignment: " + comment.TextVerticalAlignment);
// Change vertical alignment to Center if it was Fill
if (comment.TextVerticalAlignment == TextAlignmentType.Fill)
{
comment.TextVerticalAlignment = TextAlignmentType.Center;
Console.WriteLine("Changed Vertical Alignment to: " + comment.TextVerticalAlignment);
}
}
}
}
See Also
- enum TextAlignmentType
- class Comment
- namespace Aspose.Cells
- assembly Aspose.Cells