MESCIUS SPREAD for Windows Forms 15.0J
StringTrim プロパティ (EmptyCellType)
使用例 

セルに入り切らない文字を処理する方法を取得または設定します。
構文
'宣言
 
Public Shadows Property StringTrim As StringTrimming
public new StringTrimming StringTrim {get; set;}

プロパティ値

文字列のトリミング方法を決定する StringTrimming 設定
使用例
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
参照

EmptyCellType クラス
EmptyCellType メンバ

 

 


© MESCIUS inc. All rights reserved.