PowerTools SPREAD for Windows Forms 10.0J
FilterBarFilterDateTime フィールド


フィルタバーカレンダーインジケーターの画像のインデックス(18)を指定します。
構文
'Declaration
 
Public Const FilterBarFilterDateTime As Integer
'使用法
 
Dim value As Integer
 
value = SpreadView.FilterBarFilterDateTime
public const int FilterBarFilterDateTime
次のサンプルコードは、フィルタバーの日付時刻画像を作成します。
System.Globalization.DateTimeFormatInfo dtf = new System.Globalization.DateTimeFormatInfo();
dtf.ShortDatePattern = "M/d/yyyy";
dtf.ShortTimePattern = "";
dtf.LongTimePattern = "";    

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 = "10/10/2014";
fpSpread1.Sheets[0].Columns[0].CellType = new FarPoint.Win.Spread.CellType.DateTimeCellType();
\\Select a date filter (such as before or after) to see the icon
FarPoint.Win.Spread.SpreadView wrkbk = fpSpread1.GetRootWorkbook();
wrkbk.SetImage(FarPoint.Win.Spread.SpreadView.FilterBarFilterDateTime, Image.FromFile("C:\\cut.png"));
Dim dtf As New System.Globalization.DateTimeFormatInfo()
dtf.ShortDatePattern = "M/d/yyyy"
dtf.ShortTimePattern = ""
dtf.LongTimePattern = ""

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 = "10/10/2014"
FpSpread1.Sheets(0).Columns(0).CellType = New FarPoint.Win.Spread.CellType.DateTimeCellType()
'Select a date filter (such as before or after) to see the icon
Dim wrkbk As FarPoint.Win.Spread.SpreadView = FpSpread1.GetRootWorkbook()
wrkbk.SetImage(FarPoint.Win.Spread.SpreadView.FilterBarFilterDateTime, Image.FromFile("C:\cut.png"))
参照

SpreadView クラス
SpreadView メンバ

 

 


© 2004-2017, GrapeCity inc. All rights reserved.