Spread Windows Forms 11.0 Product Documentation
TextOrientation Enumeration
Example Example 


FarPoint.Win Assembly > FarPoint.Win Namespace : TextOrientation Enumeration
Specifies the orientation of the text in a control.
Syntax
'Declaration
 
Public Enum TextOrientation 
   Inherits System.Enum
'Usage
 
Dim instance As TextOrientation
public enum TextOrientation : System.Enum 
Members
MemberDescription
TextHorizontalAligns the text horizontally in the control
TextHorizontalFlippedAligns the text horizontally in the control and flipped
TextRotateCustomAligns the text based on a rotation angle for shape-related objects only
TextTopDownAligns the text from the top to the bottom of the control and wraps left to right
TextTopDownRTLAligns the text from the top to the bottom of the control and wraps right to left
TextVerticalAligns the text vertically in the control
TextVerticalFlippedAligns the text vertically in the control and flipped
Example
This example sets the text orientation and creates complex cell borders.
fpSpread1.Sheets[0].Cells[1, 3].Text = "Test"; //Cell has to have value
fpSpread1.Sheets[0].Cells[1, 3].Border = new FarPoint.Win.ComplexBorder(new FarPoint.Win.ComplexBorderSide(Color.Red, 2));// Cell has to have border

FarPoint.Win.Spread.CellType.TextCellType cellType = new FarPoint.Win.Spread.CellType.TextCellType();
cellType.TextOrientation = FarPoint.Win.TextOrientation.TextRotateCustom;
cellType.TextRotationAngle = 60; // Cell has to have rotation angle to see the effect.
fpSpread1.Sheets[0].Cells[1, 3].CellType = cellType;

FarPoint.Win.Spread.DrawingSpace.TriangleShape a = new FarPoint.Win.Spread.DrawingSpace.TriangleShape();
a.BackColor = Color.Blue;
fpSpread1.ActiveSheet.AddShape(a, 1, 1);
FarPoint.Win.Spread.DrawingSpace.SpreadCameraShape test = new FarPoint.Win.Spread.DrawingSpace.SpreadCameraShape();
test.Formula = "B1:E6";
test.Location = new System.Drawing.Point(20, 20);
fpSpread1.Sheets[0].AddShape(test);
fpSpread1.Sheets(0).Cells(1, 3).Text = "Test" 'Cell has to have value
fpSpread1.Sheets(0).Cells(1, 3).Border = New FarPoint.Win.ComplexBorder(New FarPoint.Win.ComplexBorderSide(Color.Red, 2)) ' Cell has to have border

Dim cellType As New FarPoint.Win.Spread.CellType.TextCellType()
cellType.TextOrientation = FarPoint.Win.TextOrientation.TextRotateCustom
cellType.TextRotationAngle = 60 ' Cell has to have rotation angle to see the effect.
fpSpread1.Sheets(0).Cells(1, 3).CellType = cellType

Dim a As New FarPoint.Win.Spread.DrawingSpace.TriangleShape()
a.BackColor = Color.Blue
fpSpread1.ActiveSheet.AddShape(a, 1, 1)
Dim test As New FarPoint.Win.Spread.DrawingSpace.SpreadCameraShape()
test.Formula = "B1:E6"
test.Location = New System.Drawing.Point(20, 20)
fpSpread1.Sheets(0).AddShape(test)
Inheritance Hierarchy

System.Object
   System.ValueType
      System.Enum
         FarPoint.Win.TextOrientation

See Also

Reference

FarPoint.Win Namespace