Results 1 to 5 of 5

Thread: Hiding Items thru the ListView API

  1. #1

    Thread Starter
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032

    Hiding Items thru the ListView API

    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.
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  2. #2
    Hyperactive Member
    Join Date
    Feb 2001
    Posts
    421
    What I would suggest is making an array and using stuff from it.

    VB Code:
    1. '...
    2. Static i%
    3. Dim lArray() As String
    4.  
    5. i% = i% + 1
    6. List1.AddItem i
    7. lArray(List1.ListCount)$ = "a string here"
    8. '...
    Get it?
    [vbcode]
    ' comment
    Rem remark
    [/vbcode]

  3. #3

    Thread Starter
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    ???

    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.
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  4. #4
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744
    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.

  5. #5

    Thread Starter
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    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.
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width