Bug Report: ListView, whether listitems exist or not
- when listview is shown and has 2+ column headers, remove all but one
- re-add 1 or 2 column headers
- Subscript out of Range error
I think the control is trying to redraw somewhere between the column header being added, but the header not being appended to the collection yet.
Updated: I don't know if this was the right thing to do or not, but solved the problem...
Class: lvwColumnHeaders
Method: Add
Action: moved the "ShadowListView.FColumnHeadersAdd" call to end of method
-----------------------------------------------------------------------------------------------
Have an option for you. Not just reporting bugs!
Been playing with your ListView and found something lacking. I noticed you added several types of sorting options, but didn't include the one I was looking for... Explorer-like sorting when text & numeric listitems are intermixed. Suggestion follows.
edited: sample of differences, logical compare on the left sideCode:Private Declare Function StrCmpLogicalW Lib "shlwapi" (ByVal psz1 As Long, ByVal psz2 As Long) As Long Private Function ListItemsSortingFunctionLogical(ByVal lParam1 As Long, ByVal lParam2 As Long) As Long Dim Text1 As String, Text2 As String Text1 = Me.FListItemText(lParam1 + 1, PropSortKey) Text2 = Me.FListItemText(lParam2 + 1, PropSortKey) ListItemsSortingFunctionLogical = StrCmpLogicalW(StrPtr(Text1), StrPtr(Text2)) If PropSortOrder = LvwSortOrderDescending Then ListItemsSortingFunctionLogical = -ListItemsSortingFunctionLogical End Function
2string 20string 3string 2string 20string 3string st2ring st20ring st3ring st2ring st20ring st3ring string2 string2 string3 string20 string20 string3




. I noticed you added several types of sorting options, but didn't include the one I was looking for... Explorer-like sorting when text & numeric listitems are intermixed. Suggestion follows.
Reply With Quote