Spread Windows Forms 12.0 Product Documentation
TextRotationAngle Property (EditBaseCellType)
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.CellType Namespace > EditBaseCellType Class : TextRotationAngle Property
Gets or sets the rotation angle of the text for the cell.
Syntax
'Declaration
 
Public Property TextRotationAngle As Double
'Usage
 
Dim instance As EditBaseCellType
Dim value As Double
 
instance.TextRotationAngle = value
 
value = instance.TextRotationAngle
public double TextRotationAngle {get; set;}

Property Value

Double-precision value of the number of degrees of rotation
Example
This example sets the TextRotationAngle property.
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)
See Also

Reference

EditBaseCellType Class
EditBaseCellType Members