Public Sub CaptionDoubleClick(sender As Object, e As System.EventArgs)
Dim t As Table = CurrentTable
If t.Rows.Count > 1 Then
Dim str As String = t.RowSel & t.ColSel & sender.RowSel & sender.ColSel
If t.RowSel = 0 AndAlso sender.RowSel = t.Rows.Count AndAlso str <> "00" & t.Rows.Count & t.Cols.Count Then '双击的是列标题
QAT.Items("双击列标题排序").PerformClick '切换升降序
ElseIf t.ColSel = 0 AndAlso sender.ColSel = t.Cols.Count AndAlso str <> "00" & t.Rows.Count & t.Cols.Count Then '双击的是行标题
ElseIf str = "00" & t.Rows.Count & t.Cols.Count Then '双击的是全选区
End If
ElseIf t.Rows.Count = 1 Then '一行数据时,双击三个区域都表现为双击全选区
Else
End If
End Sub
[此贴子已经被作者于2015/11/30 7:08:06编辑过]