ComboBox显示的值是由单元格的Value属性决定的,所以,你只需要设置单元格的Value属性就可以了
- Dim items As String() = New String() {"AAA", "BBB", "CCC", "DDD"}
- Dim cbct As New FarPoint.Win.Spread.CellType.ComboBoxCellType
- cbct.Items = items
- FpSpread1.ActiveSheet.Columns(1).CellType = cbct
- FpSpread1.ActiveSheet.Cells(0, 1).Value = "BBB"
复制代码 |