Results 1 to 4 of 4

Thread: make textfield search listbox

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2011
    Posts
    1

    make textfield search listbox

    I am using RealBasic which is VERY, VERRRRY similar to Visual Basic

    I have a textfield and a listbox.

    I have filled out the list box with a list of things. I now want to make it so when someone types a word(s) in the textfield it searches the listbox and ONLY displays the rows with the searched term.

    I am not sure how to do this, help is appreciated! thanks.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: make textfield search listbox

    Does a RealBasic ListBox have FindString and FindStringExact methods? I doubt it. The syntax may be similar but that doesn't mean that RealBasic questions should be asked in a VB.NET forum. I've asked the mods to move this thread to the appropriate forum.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: make textfield search listbox

    Welcome to VBForums

    Thread moved to the 'Other BASIC' forum, which is where questions for kinds of BASIC other than VB belong

  4. #4
    Hyperactive Member
    Join Date
    Jul 2009
    Posts
    489

    Re: make textfield search listbox

    Quote Originally Posted by iDoiStuff View Post
    I am using RealBasic which is VERY, VERRRRY similar to Visual Basic

    I have a textfield and a listbox.

    I have filled out the list box with a list of things. I now want to make it so when someone types a word(s) in the textfield it searches the listbox and ONLY displays the rows with the searched term.

    I am not sure how to do this, help is appreciated! thanks.
    in general what you need to do
    is to compare each string in the listbox with the text field
    and then set the visible property of the string
    but..
    i looked in the MSDN, and didn't see any visible property for strings
    so you can do one of the folows:
    1. each string can be highlighted, so you can set this property instead of visible property
    2. you can have two listboxes
    one is hidden, and one is visible
    all the strings will be in the hidden listbox
    and only strings that you want to display, you will add to the visible listbox

    i think if you don't want to use direct API, the second method is quite easy.
    HTH

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