PowerTools SPREAD for Windows Forms 10.0J
DisplayAtTopOfList プロパティ (Top10FilterItem)


表示名をフィルタドロップダウンリストの最上位に追加するかどうかを取得または設定します。
構文
'Declaration
 
Public Overrides Property DisplayAtTopOfList As Boolean
'使用法
 
Dim instance As Top10FilterItem
Dim value As Boolean
 
instance.DisplayAtTopOfList = value
 
value = instance.DisplayAtTopOfList
public override bool DisplayAtTopOfList {get; set;}
次のサンプルコードは、DisplayAtTopOfListプロパティを設定します。
fpSpread1.Sheets[0].Cells[0, 1].Value = 30;
fpSpread1.Sheets[0].Cells[1, 1].Value = 15;
fpSpread1.Sheets[0].Cells[2, 1].Value = 10;
FarPoint.Win.Spread.Top10FilterItem top10filter = new FarPoint.Win.Spread.Top10FilterItem(true, 5, false);
top10filter.DisplayAtTopOfList = true;
FarPoint.Win.Spread.IRowFilter rowFilter = new FarPoint.Win.Spread.HideRowFilter(fpSpread1.ActiveSheet);
FarPoint.Win.Spread.FilterColumnDefinition fd = new FarPoint.Win.Spread.FilterColumnDefinition(1, FarPoint.Win.Spread.FilterListBehavior.Custom);
fd.Filters.Add(top10filter);
rowFilter.ColumnDefinitions.Add(fd);
fpSpread1.ActiveSheet.RowFilter = rowFilter;
fpSpread1.ActiveSheet.AutoFilterColumn(1, top10filter.DisplayName, 0);
fpSpread1.ActiveSheet.AutoFilterMode = FarPoint.Win.Spread.AutoFilterMode.EnhancedContextMenu;
listBox1.Items.Add(top10filter.DisplayName.ToString());
FpSpread1.Sheets(0).Cells(0, 1).Value = 30
FpSpread1.Sheets(0).Cells(1, 1).Value = 15
FpSpread1.Sheets(0).Cells(2, 1).Value = 10
Dim top10filter As New FarPoint.Win.Spread.Top10FilterItem(True, 5, False)
top10filter.DisplayAtTopOfList = True
Dim rowFilter As New FarPoint.Win.Spread.HideRowFilter(FpSpread1.ActiveSheet)
Dim fd As New FarPoint.Win.Spread.FilterColumnDefinition(1, FarPoint.Win.Spread.FilterListBehavior.Custom)
fd.Filters.Add(top10filter)
rowFilter.ColumnDefinitions.Add(fd)
FpSpread1.ActiveSheet.RowFilter = rowFilter
FpSpread1.ActiveSheet.AutoFilterColumn(1, top10filter.DisplayName, 0)
FpSpread1.ActiveSheet.AutoFilterMode = FarPoint.Win.Spread.AutoFilterMode.EnhancedContextMenu
ListBox1.Items.Add(top10filter.DisplayName.ToString())
参照

Top10FilterItem クラス
Top10FilterItem メンバ

 

 


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