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.
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.
Re: make textfield search listbox
Welcome to VBForums :wave:
Thread moved to the 'Other BASIC' forum, which is where questions for kinds of BASIC other than VB belong
Re: make textfield search listbox
Quote:
Originally Posted by
iDoiStuff
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