如何调用ListView1.ColumnClick-CSDN论坛
1个回答
展开全部
用sorted电影名称排序数啊
Private Sub ListView1_ColumnClick(ByVal ColumnHeader As MSComctlLib.ColumnHeader)
If ListView1.ListItems.Count < 2 Then Exit Sub
ListView1.SortKey = ColumnHeader.SubItemIndex
If Val(ColumnHeader.Tag) = 0 Then
ListView1.SortOrder = lvwDescending
ColumnHeader.Tag = 1
Else
ListView1.SortOrder = lvwAscending
ColumnHeader.Tag = 0
End If
ListView1.Sorted = True
End Sub
解释行
Private Sub ListView1_ColumnClick(ByVal ColumnHeader As MSComctlLib.ColumnHeader)
If ListView1.ListItems.Count < 2 Then Exit Sub
ListView1.SortKey = ColumnHeader.SubItemIndex
If Val(ColumnHeader.Tag) = 0 Then
ListView1.SortOrder = lvwDescending
ColumnHeader.Tag = 1
Else
ListView1.SortOrder = lvwAscending
ColumnHeader.Tag = 0
End If
ListView1.Sorted = True
End Sub
解释行
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询