下面是我写的代码段
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
With FpTest.ActiveSheet
Dim combotype As ComboBoxCellType = New ComboBoxCellType
Dim cbstr() As String
cbstr = New String() {"One", "Two", "Three"}
Dim strval() As String
strval = New String() {"1", "2", "3"}
combotype.Items = cbstr
combotype.ItemData = strval
combotype.EditorValue = FarPoint.Win.Spread.CellType.EditorValue.ItemData
.Cells(2, 5).CellType = combotype
End With
按键盘上“1“ 的时候,"One"被显示到cell中,那我能否取得到cell中的combobox控件?
Private Sub FpTest_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles FpTest.KeyDown
With FpTest.ActiveSheet
.Cells(.ActiveRowIndex, .ActiveColumnIndex).Value = Chr(e.KeyCode)
'问题: 通过什么属性,取得活动单元格中的combobox 控件阿??? End With
End Sub |