Results 1 to 6 of 6

Thread: does ListView have a search feature?

  1. #1

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

    does ListView have a search feature?

    I'm just wondering if there is a way to search a listview? Just need to know if there is already a function or something for it, I couldnt find anything myself....
    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
    Jul 2002
    Posts
    39

    Question

    u mean serch a list box??

    ListBox1.Items.Contains()
    it will return true or false depending if it finds the thing or not

  3. #3

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    well, I'm trying to search in a ListView control, not a listbox. And I want to search in different ways:

    search for a word with and without case sensivity
    partial search and exact search

    I guess I'll do it manually
    Umm I just dont know how to check for case sensivity?
    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!!

  4. #4
    hellswraith
    Guest
    I think the string.compare() function.

    this will compair with case sensitivity.

    intReturnVal = string.Compare(string1, string2, true)
    if intReturnVal = 0 Then
    MessageBox.Show("They match case sensitivity")
    end if


    or without case sensitivity:
    intReturnVal = string.Compare(string1, string2, false)
    if intReturnVal = 0 Then
    MessageBox.Show("They match but may not be a match as far as case goes")
    end if

  5. #5
    Member
    Join Date
    Jul 2002
    Posts
    39

    Red face

    never noticed their was a list view as well

    it has the same function but it wont work for parts of the words, u could use an iterator from the collection and the string functions, i think the string function do case sensitivity

  6. #6

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    Originally posted by spike232
    never noticed their was a list view as well

    worx much better than listbox


    tnx alot hellswraith
    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