MESCIUS SPREAD for Windows Forms 15.0J
AutoFormat プロパティ
使用例 

テキストが書式に従って表示されるかどうかを取得または設定します。
構文
'宣言
 
Public Property AutoFormat As Boolean
public bool AutoFormat {get; set;}
使用例
次のサンプルコードは、AutoFormatプロパティを設定します。
System.Globalization.DateTimeFormatInfo dtf = new System.Globalization.DateTimeFormatInfo();
dtf.LongDatePattern = "D";
dtf.ShortDatePattern = "M/d/yyyy";

FarPoint.Win.Spread.CellType.FilterBarCellType fbcell = new FarPoint.Win.Spread.CellType.FilterBarCellType();
fbcell.AutoFormat = true;
fbcell.ContextMenuType = FarPoint.Win.Spread.CellType.FilterBarContextMenuType.DateTime;
fbcell.DateTimeFormatInfo = dtf;
fpSpread1.Sheets[0].AutoFilterMode = FarPoint.Win.Spread.AutoFilterMode.FilterBar;
fpSpread1.Sheets[0].FilterBar.Cells[0].CellType = fbcell;
fpSpread1.Sheets[0].Cells[0, 0].Value = DateTime.Now;
Dim dtf As New System.Globalization.DateTimeFormatInfo
dtf.LongDatePattern = "D"
dtf.ShortDatePattern = "M/d/yyyy"

Dim fbcell As New FarPoint.Win.Spread.CellType.FilterBarCellType()
fbcell.AutoFormat = True
fbcell.ContextMenuType = FarPoint.Win.Spread.CellType.FilterBarContextMenuType.DateTime
fbcell.DateTimeFormatInfo = dtf
FpSpread1.Sheets(0).AutoFilterMode = FarPoint.Win.Spread.AutoFilterMode.FilterBar
FpSpread1.Sheets(0).FilterBar.Cells(0).CellType = fbcell
FpSpread1.Sheets(0).Cells(0, 0).Value = DateTime.Now
参照

FilterBarCellType クラス
FilterBarCellType メンバ

 

 


© MESCIUS inc. All rights reserved.