Click to See Complete Forum and Search --> : make textfield search listbox
iDoiStuff
Apr 14th, 2011, 11:22 PM
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.
jmcilhinney
Apr 14th, 2011, 11:38 PM
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.
si_the_geek
Apr 15th, 2011, 01:46 AM
Welcome to VBForums :wave:
Thread moved to the 'Other BASIC' forum, which is where questions for kinds of BASIC other than VB belong
whatsup
Jun 27th, 2011, 05:32 PM
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
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.