Hi Jeff,
Not that I blame you, the documentation for these two topics (listview and
listviewitem) really could use some reworking for clarity's sake.
however, your lines like:
newLVItem.Text = "Aaron" & " " & dObj.Control("listview1").Text(1) & " " &
dObj.Control("listview1").Text(2)
don't seem to mean anything to me; I mean, the portion beyond the string of
"Aaron" that is.
maybe if you said what the listview should look like it would be clearer to
me?
thanks.
Chip
_____
From: Jeff Weiss [mailto:[email protected]]
Sent: Thursday, October 28, 2010 11:56 AM
To: [email protected]
Subject: adding new items to a listview
I am trying to figure out how to add additional items to a listview.
I want to add the items in my .vbs file.
What's wrong with these to items? I am not sure how to increment to the next
items:
If Mark < 1 Then
Dim NewLvItem
Set newLVItem = dObj.Control("listview1").NewItem
newLVItem.Text = "Aaron" & " " & dObj.Control("listview1").Text(1) & " " &
dObj.Control("listview1").Text(2)
newLVItem.Insert dObj.Control("listview1").Items.Count + 1
newLVItem.Text(1) = "Obsidian Blue"
newLVItem.Text(2) = "42"
' here's the second item I am trying to add:
Dim NewLvItem2
Set newLVItem2 = dObj.Control("listview1").NewItem
newLVItem2.Text = "Jeff" & " " & dObj.Control("listview1").Text(1) & " " &
dObj.Control("listview1").Text(2)
newLVItem2.Insert dObj.Control("listview1").Items.Count + 1
newLVItem2.Text(1) = "Red"
newLVItem2.Text(2) = "97"
Mark = Mark + 1
End if
Any help appreciated.
Jeff Weiss