Enum TextVerticalType

TextVerticalType enumeration

Represents the text direct type.

public enum TextVerticalType

Values

NameValueDescription
Vertical0East Asian Vertical display.
Horizontal1Horizontal text.
VerticalLeftToRight2Displayed vertical and the text flows top down then LEFT to RIGHT
Vertical903Each line is 90 degrees rotated clockwise
Vertical2704Each line is 270 degrees rotated clockwise
Stacked5Determines if all of the text is vertical
StackedRightToLeft6Specifies that vertical WordArt should be shown from right to left rather than left to right.

Examples

[C#]

namespace Demos
{
    using Aspose.Cells;
    using Aspose.Cells.Drawing;
    using Aspose.Cells.Drawing.Texts;
    using System;

    public class TextVerticalTypeDemo
    {
        public static void TextVerticalTypeExample()
        {
            // Instantiating a Workbook object
            Workbook workbook = new Workbook();
            Worksheet worksheet = workbook.Worksheets[0];

            // Adding a rectangle shape to the worksheet
            Shape shape = worksheet.Shapes.AddRectangle(1, 0, 1, 0, 50, 100);

            // Accessing the text alignment settings of the shape
            ShapeTextAlignment shapeTextAlignment = shape.TextBody.TextAlignment;

            // Setting the text vertical type to Horizontal
            shapeTextAlignment.TextVerticalType = TextVerticalType.Horizontal;

            // Setting other properties for demonstration
            shapeTextAlignment.IsTextWrapped = true;
            shapeTextAlignment.RotateTextWithShape = true;
            shapeTextAlignment.TextVerticalOverflow = TextOverflowType.Clip;
            shapeTextAlignment.TextHorizontalOverflow = TextOverflowType.Clip;
            shapeTextAlignment.RotationAngle = 90;
            shapeTextAlignment.IsLockedText = false;
            shapeTextAlignment.AutoSize = false;
            shapeTextAlignment.TextShapeType = AutoShapeType.TextBox;
            shapeTextAlignment.TopMarginPt = 2.0d;
            shapeTextAlignment.BottomMarginPt = 2.0d;
            shapeTextAlignment.LeftMarginPt = 2.0d;
            shapeTextAlignment.RightMarginPt = 2.0d;
            shapeTextAlignment.IsAutoMargin = true;
            shapeTextAlignment.NumberOfColumns = 1;

            // Saving the workbook
            workbook.Save("TextVerticalTypeExample.xlsx");

            return;
        }
    }
}

See Also