473,322 Members | 1,714 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Search In ListBox

hi all.
any one know a standard/free ListBox Control for vb.net
that can be searched in, even in 'multiSelect' state?
thanks.
Nov 21 '05 #1
9 5239
Shachar,

The listview in detail mode with one column comes in my opinion very near to
what you ask.

Cor

next
"shachar" <an*******@discussions.microsoft.com>
hi all.
any one know a standard/free ListBox Control for vb.net
that can be searched in, even in 'multiSelect' state?
thanks.

Nov 21 '05 #2
Shachar,

The listview in detail mode with one column comes in my opinion very near to
what you ask.

Cor

next
"shachar" <an*******@discussions.microsoft.com>
hi all.
any one know a standard/free ListBox Control for vb.net
that can be searched in, even in 'multiSelect' state?
thanks.

Nov 21 '05 #3
"shachar" <an*******@discussions.microsoft.com> schrieb:
any one know a standard/free ListBox Control for vb.net
that can be searched in, even in 'multiSelect' state?


Take a look at the listbox's 'FindString' and 'FindStringExact' methods.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 21 '05 #4
"shachar" <an*******@discussions.microsoft.com> schrieb:
any one know a standard/free ListBox Control for vb.net
that can be searched in, even in 'multiSelect' state?


Take a look at the listbox's 'FindString' and 'FindStringExact' methods.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 21 '05 #5
>
Take a look at the listbox's 'FindString' and 'FindStringExact' methods.

For multiselect?

AFAIK does that find the first.

Cor
Nov 21 '05 #6
>
Take a look at the listbox's 'FindString' and 'FindStringExact' methods.

For multiselect?

AFAIK does that find the first.

Cor
Nov 21 '05 #7
Shachar,

I am always strugling finding that multiselect settig of a listbox, I knew
it again, this can be the code with a listbox.

\\\
ListBox1.SelectionMode = SelectionMode.MultiExtended

For i As Integer = 0 To ListBox1.Items.Count - 1
ListBox1.SetSelected(i, False)
If ListBox1.Items(i).ToString.IndexOf("a") <> -1 Then
'"a" is any searchitem
ListBox1.SetSelected(i, True)
End If
Next
///

I hope this helps?

Cor
"shachar" <an*******@discussions.microsoft.com>
...
hi all.
any one know a standard/free ListBox Control for vb.net
that can be searched in, even in 'multiSelect' state?
thanks.

Nov 21 '05 #8
Shachar,

I am always strugling finding that multiselect settig of a listbox, I knew
it again, this can be the code with a listbox.

\\\
ListBox1.SelectionMode = SelectionMode.MultiExtended

For i As Integer = 0 To ListBox1.Items.Count - 1
ListBox1.SetSelected(i, False)
If ListBox1.Items(i).ToString.IndexOf("a") <> -1 Then
'"a" is any searchitem
ListBox1.SetSelected(i, True)
End If
Next
///

I hope this helps?

Cor
"shachar" <an*******@discussions.microsoft.com>
...
hi all.
any one know a standard/free ListBox Control for vb.net
that can be searched in, even in 'multiSelect' state?
thanks.

Nov 21 '05 #9
"Cor Ligthert" <no************@planet.nl> schrieb:
Take a look at the listbox's 'FindString' and 'FindStringExact' methods.


For multiselect?

AFAIK does that find the first.


ACK, but you can specify the index where the search should start. You can
use the index of the last element that was found using 'FindString' + 1 as
start index for the next call to 'FindString'.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 21 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Ben | last post by:
I've got an asp page that populates a listbox with info from a db. The list box ends up being pretty big, so I want to be able to search it effectively. I like the method wherein the user types...
1
by: damjanu | last post by:
Dear All; I have 3 issues 1) On some of my tables I have unique indexes, so that for example no two phone numbers can be the same. When user enters phone number that already exists, a scary...
0
by: Colleyville Alan | last post by:
I have an app that looks up an id number and when a button is clicked, inputs the id # into a query. After running the query, I click a second button which grabs the client name rather than the id...
3
by: Colleyville Alan | last post by:
I have a incremental search box that has been working fine for a couple of months but is now acting up. This search box is from the cd that comes with Getz's book, so I did not write it and have...
15
by: allansiu823 | last post by:
Hi I am new to MS Access and VBA and have been bothered by this problem for a looooong time. I have this listbox containing all the records (~1000) in a form and I want to be able to type something...
1
by: tonsam | last post by:
I have a form (stockcard) and I'm planning to create a search form(stock_search) with a listbox(stock_listbox) that will only be visible upon a click of the button. In the said listbox I will choose...
16
by: Computer geek | last post by:
Hello, I am new to VB.NET and programming in general. I have taught myself a lot of the basics with vb.net but am still quite the novice. I am working on a little application now and I need some...
0
by: noobkuku | last post by:
Guys i got this error i don know how to slove it anyone can enlighten me? http://i15.tinypic.com/4ztjzas.jpg Private Sub search_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)...
10
by: Eugenio | last post by:
Hi there, I'm returning to this forum for the second time and I would like to say thanks for the great help provided. I've encountered a new problem now and hope that you will be able to help me...
9
by: weirdguy | last post by:
Hello, Just for anyone information, there is a similar title "Search in Listbox" but it is via Combo Box. In case, anyone need it, I put a link to here. Please let me know if I break any rules...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.