Results 1 to 4 of 4

Thread: any functions for seaching the listview?

  1. #1

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    any functions for seaching the listview?

    Is there any function that could search for an item in a listview by getting the text of the listitem? the Items.IndexOf() function gets a listview item, which doesnt seem to work. I'm just trying to search for an item by searching for the item's TEXT....
    or maybe there is a function for this and I'm just too sleepy to recognize it
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  2. #2
    Member
    Join Date
    Sep 2002
    Location
    California
    Posts
    52
    The IndexOf method does work, it returns the index position of the String you searched for.

    Dim index as Integer = ListBox1.Items.IndexOf("item name")

    You can also use the Contains method which returns a Boolean value.

  3. #3
    Registered User
    Join Date
    Nov 2002
    Location
    Växjö, Sweden
    Posts
    314
    I can't find a search function either. You can always loop through the items and compare the strings.

  4. #4

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    Originally posted by wyrd
    The IndexOf method does work, it returns the index position of the String you searched for.

    Dim index as Integer = ListBox1.Items.IndexOf("item name")

    You can also use the Contains method which returns a Boolean value.
    well yeah but that's for listbox, not listview.... it's nothing important.
    Just wanted to know if there is a function before I make my own crappy version of the search function
    thanks
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

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