PowerTools SPREAD for Windows Forms 8.0J
ListWidth プロパティ (ComboBoxCellType)


ドロップダウンリストの幅を取得または設定します(ピクセル単位)。
構文
'Declaration
 
Public Property ListWidth As Integer
'使用法
 
Dim instance As ComboBoxCellType
Dim value As Integer
 
instance.ListWidth = value
 
value = instance.ListWidth
public int ListWidth {get; set;}

プロパティ値

リスト ボックスの幅(ピクセル単位)を表す Integer
解説

これは、ドロップダウン リストの幅をピクセル単位で設定します。

設定可能な値は次のとおりです。

設定 説明
0 最も幅の広い項目:リストは最も幅の広い項目の幅になります。
-1 セル幅:リストはセルの幅になります。
n ピクセル幅:n は任意の正の整数です。リストは n ピクセルの幅になります。

次のサンプルコードは、1月から6月までを含むコンボボックスを最初のシートのセルに設定し、表示部分のサイズを指定します。
FarPoint.Win.Spread.CellType.ComboBoxCellType cmbocell = new FarPoint.Win.Spread.CellType.ComboBoxCellType();
cmbocell.Items = (new String[] {"January", "February", "March", "April", "May", "June"});
cmbocell.AcceptsArrowKeys = FarPoint.Win.SuperEdit.AcceptsArrowKeys.AllArrows;
cmbocell.AutoSearch = FarPoint.Win.AutoSearch.SingleCharacter;
cmbocell.Editable = true;
cmbocell.ListAlignment = FarPoint.Win.ListAlignment.Left;
cmbocell.ListOffset = 20;
cmbocell.ListWidth = 0;
cmbocell.MaxDrop = 4;
fpSpread1.Sheets[1].Cells[2,2].CellType = cmbocell;
Dim cmbocell As New FarPoint.Win.Spread.CellType.ComboBoxCellType()
cmbocell.Items = (new String() {"January", "February", "March", "April", "May", "June"})
cmbocell.AcceptsArrowKeys = FarPoint.Win.SuperEdit.AcceptsArrowKeys.AllArrows
cmbocell.AutoSearch = FarPoint.Win.AutoSearch.SingleCharacter
cmbocell.Editable = True
cmbocell.ListAlignment = FarPoint.Win.ListAlignment.Left
cmbocell.ListOffset = 20
cmbocell.ListWidth = 0
cmbocell.MaxDrop = 4
fpSpread1.Sheets(1).Cells(2,2).CellType = cmbocell
参照

ComboBoxCellType クラス
ComboBoxCellType メンバ

開発者ガイド

コンボボックス型セル
コンボボックス型セル

 

 


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