Do you know how to add items & subitems to a listview? You might want to look it up, try it, and post some code if you have problems.
Basically, the first column is a listview item, and the other columns are subitems of that. They can be added with .Add, using the counter as an index.
OK, here's an example. You can also add items & subitems at design time. There are other ways to do it.
VB Code:
Dim LvItem as New ListViewItem() 'this would be outside a loop 'one way LvItem.Text = "Blah blah" LvItem.SubItems.Add("yada yada") LvItem.Subitems.Add(strText) myListView.Items.Add(LvItem) 'another way Set LvItem = myListView.Items.Add("Blah blah") LvItem.SubItems(1) = "yada yada" LvItem.SubItems(2) = strText 'so Dim LvItem as New ListViewItem() For i = 1 to 12 For j = 1 to 12 Set LvItem = myListView.Items.Add(i) LvItem.SubItems(1) = "x" LvItem.SubItems(2) = j LvItem.SubItems(3) = "=" LvItem.SubItems(1) = i * j Next Next




Reply With Quote