ListView ListItems - can they be hidden?

P

Phill W.

Is it possible, in a VB'2003 ListView control to hide specific
ListViewItems?

I have a ListView that I've loaded with stuff but it would be useful to
be able to view these items as
(a) the complete list,
(b) a subset that matches a given criteria, or
(c) the complementary subset that doesn't match the criteria.

I've gotten as far as changing the text colour of items in each subset,
greying out the "unwanted" ones, but it would better to hide them
altogether.

Is this possible?

TIA,
Phill W.
 
K

Ken Tucker [MVP]

Phill,

You will have to remove the listviewitem from the listview to
hide it

Ken
 
P

Phill W.

Ken said:
You will have to remove the listviewitem from the listview to
hide it

I was afraid of that.
I don't suppose there's anyway to pre-prepare a list of ListViewItems
and "plug" them in all in one go, is there?
Ah; No, the Items property is read-only, so I guess not.

OK; if I'm going to have to reload the ListView each time I filter it,
is there anyway I can "lock" the Control, to prevent it redrawing itself
while I'm doing so - it should be faster and a lot less "flickery" than
it is now.

TIA,
Phill W.
 

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