本帖最后由 libo 于 2018-7-31 16:25 编辑
设置EditModePermanent =true,
点击两次combobox单元格的dropbownbutton,焦点离开时报错,请问是什么原因?
如图0002.png
逻辑代码如下:
Private Sub FpSpread1_EditModeOn(sender As Object, e As EventArgs) Handles FpSpread1.EditModeOn
Dim ct As FarPoint.Win.Spread.CellType.ComboBoxCellType
With FpSpread1.ActiveSheet
ct = TryCast(.GetCellType(.ActiveRowIndex, .ActiveColumnIndex), FarPoint.Win.Spread.CellType.ComboBoxCellType)
ct.ListControl = New ListBox
AddHandler ct.ListControl.VisibleChanged, AddressOf Spread_CboLst_VisibleChanged
End With
End Sub
Private Sub FpSpread1_EditModeOff(sender As Object, e As EventArgs) Handles FpSpread1.EditModeOff
Dim ct As FarPoint.Win.Spread.CellType.ComboBoxCellType
With FpSpread1.ActiveSheet
ct = TryCast(.GetCellType(.ActiveRowIndex, .ActiveColumnIndex), FarPoint.Win.Spread.CellType.ComboBoxCellType)
RemoveHandler ct.ListControl.VisibleChanged, AddressOf Spread_CboLst_VisibleChanged
ct.ListControl = Nothing
End With
End Sub
Private Sub Spread_CboLst_VisibleChanged(sender As Object, e As EventArgs)
End Sub
Private Sub FpSpread1_ComboCloseUp(sender As Object, e As FarPoint.Win.Spread.EditorNotifyEventArgs) Handles FpSpread1.ComboCloseUp
FpSpread1.Focus()
End Sub
|
-
|