PDA

Click to See Complete Forum and Search --> : Hiding Items thru the ListView API


JoshT
Feb 5th, 2002, 02:23 PM
Can you hide rather than delete an item in an API List View (not the VB ActiveX Control -- the listview I'm manipulating was not generated by VB). What I have now is a File Open Dialog Box where as the user types characters into the file name box, I remove files from the list view box that don't start with the letters typed. However, I need a way to put files back if they backspace, etc.

Thanks.

Oafo
Feb 5th, 2002, 03:16 PM
What I would suggest is making an array and using stuff from it.


'...
Static i%
Dim lArray() As String

i% = i% + 1
List1.AddItem i
lArray(List1.ListCount)$ = "a string here"
'...

Get it?

JoshT
Feb 6th, 2002, 06:23 AM
???

I need to do this via pure API, I think. I need a message I can send instead of LVM_DELETEITEM to hide the item rather than remove it if possible, or be able to persist the whole item structure and then delete it.

Serge
Feb 6th, 2002, 01:59 PM
I don't think there is a message that you can send to hide the item. The only thing I can think of is to change it's forecolor to the color of the ListView's background.

JoshT
Feb 7th, 2002, 10:24 AM
Ok, thanks, I'll try that, but I would think there'd be gaps in the list. I think I need to copy the items elsewhere and then delete them so I could add them back.