|
-
Feb 5th, 2000, 11:48 AM
#1
Thread Starter
New Member
i want to add a listbox with columns to my program. there is a 'ListView' control in 'Microsoft's Common Controls' that i thought was what i wanted, but i can't seem to use it right. i went to its properties and created columns, but they didn't show up and i don't know how to add anything to the list either. the only example of these lists i can think of is on the 'transfer' screen of napster( http://www.napster.com/ ). i know i've seen these in many places, but i can't think of any other examples. can anyone help? thanks
------------------
-cxs
[email protected]
-
Feb 5th, 2000, 12:41 PM
#2
Here's how you use a ListView with Multiple Columns:
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]
-
Feb 5th, 2000, 01:21 PM
#3
Thread Starter
New Member
thanks aaron ;D
------------------
-cxs
[email protected]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|