Search Letter By Letter
-
Hi, I have a textbox and a listbox. All I want to do is, when I enter a letter (in the textchanged of the textbox I want to search that letter, from the Listbox.) This is just the same as the windows do when you want to search for something. My problem is this .. because if I am searching for a film called "Platoon", I want to write all the of word Platoon not "P" and then "L" and the listbox indicates the word platoon. This is how i want to make it. Can anyone help me please??
Adrian De Battista - Web Designer, Web Programmer, Software Programmer From Malta. My Website .. www.MaltaTrade.org
-
Hi, I have a textbox and a listbox. All I want to do is, when I enter a letter (in the textchanged of the textbox I want to search that letter, from the Listbox.) This is just the same as the windows do when you want to search for something. My problem is this .. because if I am searching for a film called "Platoon", I want to write all the of word Platoon not "P" and then "L" and the listbox indicates the word platoon. This is how i want to make it. Can anyone help me please??
Adrian De Battista - Web Designer, Web Programmer, Software Programmer From Malta. My Website .. www.MaltaTrade.org
ADY007 wrote:
because if I am searching for a film called "Platoon", I want to write all the of word Platoon not "P" and then "L" and the listbox indicates the word platoon.
So, what is your problem ? You want to be able to enter an entire word before the filtering starts ?
ADY007 wrote:
Web Designer, Web Programmer
IS this an ASP.NET app ?
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
-
ADY007 wrote:
because if I am searching for a film called "Platoon", I want to write all the of word Platoon not "P" and then "L" and the listbox indicates the word platoon.
So, what is your problem ? You want to be able to enter an entire word before the filtering starts ?
ADY007 wrote:
Web Designer, Web Programmer
IS this an ASP.NET app ?
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
no no .. i want the filter to begin when i enter a letter. When i enter "P" .. the listbox goas and highlits the Word "Platoon" if "Platoon" is the only word that begins with letter "P" for example. If theres another word then nevermind i will enter the second letter and the filter will search for a word that begins with "Pl". You know what i mean?? thanks very mcuh
Adrian De Battista - Web Designer, Web Programmer, Software Programmer From Malta. My Website .. www.MaltaTrade.org
-
no no .. i want the filter to begin when i enter a letter. When i enter "P" .. the listbox goas and highlits the Word "Platoon" if "Platoon" is the only word that begins with letter "P" for example. If theres another word then nevermind i will enter the second letter and the filter will search for a word that begins with "Pl". You know what i mean?? thanks very mcuh
Adrian De Battista - Web Designer, Web Programmer, Software Programmer From Malta. My Website .. www.MaltaTrade.org
OK, so handle the keypress event, and iterate over your listbox Items collection, looking for one that starts with what has been typed, and set it's selected flag to true.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )