FarPoint.Win.SpreadJ アセンブリ > FarPoint.Win.Spread.CellType 名前空間 > ComboBoxCellType クラス : MaxLength プロパティ |
'Declaration Public Property MaxLength As Integer
'使用法 Dim instance As ComboBoxCellType Dim value As Integer instance.MaxLength = value value = instance.MaxLength
public int MaxLength {get; set;}
デフォルトでは、編集フィールドのテキストは255文字に制限され、左揃えになります。このプロパティを設定することで、最大文字数を変更できます。
FarPoint.Win.Spread.CellType.ComboBoxCellType cb = new FarPoint.Win.Spread.CellType.ComboBoxCellType(); cb.Items = new string[] {"OneHundredThousand", "TwoHundredThousand", "ThreeHundredThousand"}; cb.ListWidth = 0; cb.MaxLength = 10; cb.Editable = true; fpSpread1.ActiveSheet.Cells[0, 0].CellType = cb; fpSpread1.ActiveSheet.Columns[0].Width = 120;
Dim cb As New FarPoint.Win.Spread.CellType.ComboBoxCellType cb.Items = New String() {"OneHundredThousand", "TwoHundredThousand", "ThreeHundredThousand"} cb.ListWidth = 0 cb.MaxLength = 10 cb.Editable = True FpSpread1.ActiveSheet.Cells(0, 0).CellType = cb FpSpread1.ActiveSheet.Columns(0).Width = 120