How can i use the Lisview control in my project ?
Printable View
How can i use the Lisview control in my project ?
Like this:
------------------Code:Private Sub Form_Load()
Dim iIndex As Integer
Dim oListItem As ListItem
With ListView1
.View = lvwReport
.FullRowSelect = True
.ColumnHeaders.Add , , "Column1"
.ColumnHeaders.Add , , "Column2"
.ColumnHeaders.Add , , "Column3"
For iIndex = 1 To 10
Set oListItem = .ListItems.Add(, , "Item" & iIndex)
oListItem.ListSubItems.Add , , iIndex & " - Part2"
oListItem.ListSubItems.Add , , iIndex & " - Part3"
Next
End With
End Sub
Aaron Young
Analyst Programmer
[email protected]
[email protected]
Well Aaron, there seems to be a problem. I cant declare a Listview. It cant find anything called Listview when i
Dim oListview as Listview. no listview comes up as an option.
isnt it possible to get it up as a icon, likse the listbox and the combobox ?
what to do ? frustrated...
Select Components from the Project menu. Then select Microsoft Windows Common Controls X (where x is the latest version you have installed) from the list. Click OK.
Add a ListView control from the ToolBox to your form.....thats all.
------------------
Serge
Programmer Analyst
[email protected]
[email protected]
ICQ#: 51055819
Well. I have got the listview working. That was nice!
But, is there a way to clear the listview ? Couldnt seem to find a listview.clear
ANy ideas ?
I rekon these listview questions are asked every day :eek:
ListView1.ListItems.Clear
------------------
Mark Sreeves
Analyst Programmer
[email protected]
A BMW Group Company