Spread Windows Forms 10.0 Product Documentation
TextOrientation Property (EmptyCellType)
Example 


Gets or sets how text orients itself when painting the cell.
Syntax
'Declaration
 
Public Shadows Property TextOrientation As TextOrientation
'Usage
 
Dim instance As EmptyCellType
Dim value As TextOrientation
 
instance.TextOrientation = value
 
value = instance.TextOrientation
public new TextOrientation TextOrientation {get; set;}

Property Value

TextOrientation setting that determines how text is oriented
Example
private void fpSpread1CellClick(object sender, FarPoint.Win.Spread.CellClickEventArgs e)
{
      FarPoint.Win.Spread.CellType.ICellType ct;
      ct = e.View.Sheets[0].Cells[e.Row, e.Column].CellType;
      if(ct is FarPoint.Win.Spread.CellType.GeneralCellType)
      {
            FarPoint.Win.Spread.CellType.EmptyCellType empty = new FarPoint.Win.Spread.CellType.EmptyCellType();
            empty.AcceptsArrowKeys = FarPoint.Win.SuperEdit.AcceptsArrowKeys.AllArrows;
            empty.StringTrim = StringTrimming.EllipsisCharacter;
            empty.TextOrientation = FarPoint.Win.TextOrientation.TextHorizontal;
            e.View.Sheets[0].Cells[e.Row, e.Column].CellType = empty;
            e.View.Sheets[0].Cells[e.Row, e.Column].Text = "This is an empty cell";
      }
}
Private Sub FpSpread1CellClick(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.CellClickEventArgs) Handles FpSpread1.CellClick
      Dim ct As FarPoint.Win.Spread.CellType.ICellType
      ct = e.View.Sheets(0).Cells(e.Row, e.Column).CellType
      If TypeOf ct Is FarPoint.Win.Spread.CellType.GeneralCellType Then
            Dim empty As New FarPoint.Win.Spread.CellType.EmptyCellType
            empty.AcceptsArrowKeys = FarPoint.Win.SuperEdit.AcceptsArrowKeys.AllArrows
            empty.StringTrim = StringTrimming.EllipsisCharacter
            empty.TextOrientation = FarPoint.Win.TextOrientation.TextHorizontal
            e.View.Sheets(0).Cells(e.Row, e.Column).CellType = empty
            e.View.Sheets(0).Cells(e.Row, e.Column).Text = "This is an empty cell"
      End If
End Sub
Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows Server 2012 R2, Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10

See Also

Reference

EmptyCellType Class
EmptyCellType Members

 

 


Copyright © GrapeCity, inc. All rights reserved.