Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 487425
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T01:36:13+00:00 2026-05-13T01:36:13+00:00

I have a listbox & textbox above it. I want to the user to

  • 0

I have a listbox & textbox above it. I want to the user to be able to search the listbox just by starting to type the letters of the word or part of the word in the textbox.

What is the best way to code this? The most efficient?

An example would be great.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T01:36:13+00:00Added an answer on May 13, 2026 at 1:36 am

    Have an originalList<> of items and a resultList<>

    .NET 2.0 Iterate through each item in the listbox and

    if(yourString.Contains(<the textbox text>)
    

    Add to the searcedList and bind the list to the resultList<> That will give you all results in the list box where the text matches the textbox search.

    Could then get fancy with some regex etc to match only whole words, just the start of words etc.

    Edit – If the text length is changed to zero, or some min length then revert back to originalList<>

    .NET 3.5 Use Linq to search through and pull out all results, could order this by the chars in the text box.

    Just my 2p, sure there will be some much cleaner approaches posted.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a big part of xaml code (ListBox & ListBoxItems) and I need
I have a listbox on a page: <select id=user_list name=user_list size=21 style=width:200px;> <option value=1>User
I have a ListBox with items that fill TextBox es. How do I identify
I have two classes A & B, and a listbox. I assign listBox.ItemsSource equal
I have a form that has two buttons, textbox, listbox, and a combobox. The
I have a ListBox & it has some files. I have 2 Panels in
I have a ListBox in single-selection-mode containing some items. I implemented that the user
i have made a listbox datatemplated with button and binded to a textbox. i
I am developing a programme using python & wxPython. I have a listbox, and
I have a for loop that I want (for every item in a ListBox

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.