高分求教:关于Spread的问题(至急)。
haodp 2008-07-02 06:06:37 怎么使用GeneralCellType而不使用NumberCellType控制整数部分的长度。理由:使用NumberCellType时,不能使用del,backspace消除小数部分。
当然如果能够使用代码实现del,backspace消除spread入力值得小数部分的话,更好。
'spread
Dim genlcell As New FarPoint.Win.Spread.CellType.GeneralCellType()
Dim numform As System.Globalization.NumberFormatInfo = CType(System.Globalization.NumberFormatInfo.CurrentInfo.Clone(), System.Globalization.NumberFormatInfo)
numForm.NumberDecimalDigits = 2
numForm.NumberDecimalSeparator = "."
numForm.NegativeSign = ""
genlcell.NumberFormat = numform
FpSpread1.ActiveSheet.Cells(0, 0).CellType =genlcell
但是不能控制整数部分长度。请问那位大哥帮忙解决一下。
100分不够的话,可以给尽我所有的csdn分,只要能够解决问题。至急求教。