Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Search Letter By Letter

Search Letter By Letter

Scheduled Pinned Locked Moved Visual Basic
helpalgorithmsquestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    ADY007
    wrote on last edited by
    #1

    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

    C 1 Reply Last reply
    0
    • A ADY007

      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

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      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 )

      A 1 Reply Last reply
      0
      • C Christian Graus

        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 )

        A Offline
        A Offline
        ADY007
        wrote on last edited by
        #3

        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

        C 1 Reply Last reply
        0
        • A ADY007

          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

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          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 )

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups