Results 1 to 2 of 2

Thread: Another ListView question

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 1999
    Location
    Brossard, Québec, Canada
    Posts
    241

    Post

    Using the FindItem Method of a listview with the lvwSubItem parameter (telling it to search in subitems collection for the specified text) doesn't seem to be working.

    Am I doing something wrong?
    Here's the code:
    Dim ItemFound As ListItem
    Set ItemFound = lstProducts.FindItem(txtSearch.Text, IIf(fraSearchType = 1, lvwText, lvwSubItem), , lvwPartial)
    If Not ItemFound Is Nothing Then lstProducts.ListItems(ItemFound.Index).Selected = True
    lstProducts.SelectedItem.EnsureVisible

    when fraSearchType = 1 everything works perfectly but if fraSearchType <> 1, ItemFound is always Nothing...

    Any Ideas?

  2. #2
    Registered User
    Join Date
    Apr 1999
    Location
    Brazil
    Posts
    144

    Post

    Your code are quite well, any way I'm sending you the code that I used. I'm using MSCOMCTL.OCX (ListView 6.0), I don't know about you!

    Boa sorte!
    Jefferson

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