ListView items and subitems curiosity.

M

Max Moor

Hi All,

So I've started working with ListView controls. One thing that I got
hung up on briefly was referencing the different columns in a selected row.
The first column is the .Item, and the others are .Item.SubItem objects,
indexed starting with 1. I couldn't get to the first column via a SubItem
(0). This gave an invalid index range error.

I guess I'm not sure what else I expect the .Item object to be, but I
sort of expected all columns to be in the same Subitems collection. It seems
that the columns other than the first are a collection belonging to the first
column (so to speak). It just seems counter-intuitive to me.

I'm just curious if anyone can explain why the ListView is designed
this way so I can better wrap my head around it. Comments? Ideas?

Regards,
Max
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top