这是是双击的,是否可以修改下做成单击的
AfterOpenProject
For Each t As Table In Tables
t.grid.Name = t.Name
addhandler t.grid.MouseEnterCell, addressof MouseEnterCellHandler
addhandler t.grid.MouseLeaveCell, addressof MouseLeaveCellHandler
addhandler t.grid.DoubleClick, addressof DoubleClickHandler
addhandler t.grid.click, addressof ClickHandler
Next
全局代码
Default
Public headCol As Integer = -1
Public Sub MouseLeaveCellHandler(sender As object, e As C1.Win.C1FlexGrid.RowColEventArgs )
headcol = -1
End Sub
Public Sub MouseEnterCellHandler(sender As object, e As C1.Win.C1FlexGrid.RowColEventArgs )
If e.Row = 0 Then
headcol = e.Col
End If
End Sub
Public Sub DoubleClickHandler(sender As object, e As System.EventArgs)
If headcol <> -1 Then
Dim str As String
try
cursor.tostring
str = "正常"
catch ex As exception
str = "特殊"
End try
msgbox(str)
End If
End Sub
Public cursor
Public Sub ClickHandler(ByVal sender As System.Object, ByVal e As System.EventArgs)
cursor = System.Windows.Forms.Cursor.Current
End Sub