-
Woa... They realy changed this around. Anyways, I need help on using the ListView component in the Windows Common Controls 5.0 (SP2). Is there any tutorials/help files for it? I could flat out ask u the questions that i need answered. But that would take ages. :cool:
§tay |{ewl,
L0phtpDK
-
i cant beleive no one knows....
-
Example of basic operation:
Code:
Private Sub Command1_Click()
'delete list items
If ListView1.ListItems.Count > 0 Then
ListView1.ListItems.Remove ListView1.ListItems.Count
If ListView1.ListItems.Count > 0 Then
ListView1.ListItems(1).Selected = True
Me.ListView1.SetFocus 'to make selection dark blue
End If
End If
End Sub
Private Sub Command2_Click()
'currently selected list item
If Me.ListView1.ListItems.Count > 0 Then
MsgBox "List item currently selected is a Date And is " & Me.ListView1.SelectedItem
MsgBox "Current index selected is " & Me.ListView1.SelectedItem.Index
End If
End Sub
Private Sub Form_Load()
Dim li As ListItem
With Me.ListView1
.ColumnHeaders.Add , , "Date"
.ColumnHeaders.Add , , "Time"
.ColumnHeaders.Add , , "Password"
.FullRowSelect = True
.View = lvwReport
.HideSelection = False 'required To make selections In code work
Set li = .ListItems.Add(, , Date - 1)
li.SubItems(1) = Time
li.SubItems(2) = "Password"
Set li = .ListItems.Add(, , Date)
li.SubItems(1) = Time
li.SubItems(2) = "Password"
End With
End Sub
-
thanks. Thats a start, but i'm looking for a doc with more detail on how to use one.