作成日: 2025/03/07 最終更新日: 2025/05/15
文書種別
不具合
発生環境
17.0J
状況
修正済み
詳細
回避方法
■サンプルコード(VB.NET)
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
FpSpread1.ActiveSheet.ColumnCount = 2
FpSpread1.ActiveSheet.RowCount = 2
' 回避策(標準型セルを明示的に設定)
Dim celltype As GeneralCellType = New GeneralCellType()
FpSpread1.ActiveSheet.Cells(0, 0, 1, 1).CellType = celltype
Dim cnotify As New FarPoint.Win.Spread.ValueProcess()
cnotify.ValueProcessOption = FarPoint.Win.Spread.ValueProcessOption.Clear
'cnotify.ValueProcessOption = FarPoint.Win.Spread.ValueProcessOption.Restore
cnotify.DoActionReason = ValidateReasons.EndEdit
Dim tvalid As New FarPoint.Win.Spread.TextLengthValidator()
tvalid.LengthUnit = FarPoint.Win.Spread.LengthUnit.Char
tvalid.MaximumLength = 6
tvalid.MinimumLength = 0
tvalid.Actions.Add(cnotify)
FpSpread1.Sheets(0).AddValidators(New FarPoint.Win.Spread.Model.CellRange(0, 0, 1, 1), tvalid)
End Sub