473,396 Members | 1,982 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,396 software developers and data experts.

How set ComboBox to auto-complete?

In my Windows forms app, I want my ComboBoxes to let the user begin to type
values and it start to populate (if a match is found). But, I don't want
the user to enter a value that is not in the list.

What properties do I need to set to what to make this happen, please?

I think it the involved properties are:

DropDownStyle
AutoCompleteMode
AutoCompleteSource

.... but there are lots of different settings.

thanks
Feb 28 '08 #1
3 2433
On Feb 28, 12:50*pm, "Ronald S. Cook" <rc...@westinis.comwrote:
In my Windows forms app, I want my ComboBoxes to let the user begin to type
values and it start to populate (if a match is found). *But, I don't want
the user to enter a value that is not in the list.

What properties do I need to set to what to make this happen, please?

I think it the involved properties are:

DropDownStyle
AutoCompleteMode
AutoCompleteSource

... but there are lots of different settings.

thanks
DropDownStyle = DropDownList
Feb 28 '08 #2
That does only the first letter.
<za***@construction-imaging.comwrote in message
news:e6**********************************@h25g2000 hsf.googlegroups.com...
On Feb 28, 12:50 pm, "Ronald S. Cook" <rc...@westinis.comwrote:
In my Windows forms app, I want my ComboBoxes to let the user begin to
type
values and it start to populate (if a match is found). But, I don't want
the user to enter a value that is not in the list.

What properties do I need to set to what to make this happen, please?

I think it the involved properties are:

DropDownStyle
AutoCompleteMode
AutoCompleteSource

... but there are lots of different settings.

thanks
DropDownStyle = DropDownList

Feb 28 '08 #3
On Feb 28, 2:40*pm, "Ronald S. Cook" <rc...@westinis.comwrote:
That does only the first letter.
Correct. As far as I am aware, that's all .NET ComboBox does for you.
If you want true autocomplete, then you are going to have to write
some custom code in the controls TextChanged event. But I wouldn't re-
invent the wheel, do a Google search, I'm sure you will fine some code
out there that does it. I personally have never looked for a .NET
version, but we use a VB6 version where I work.
>
<za...@construction-imaging.comwrote in message

news:e6**********************************@h25g2000 hsf.googlegroups.com...
On Feb 28, 12:50 pm, "Ronald S. Cook" <rc...@westinis.comwrote:


In my Windows forms app, I want my ComboBoxes to let the user begin to
type
values and it start to populate (if a match is found). But, I don't want
the user to enter a value that is not in the list.
What properties do I need to set to what to make this happen, please?
I think it the involved properties are:
DropDownStyle
AutoCompleteMode
AutoCompleteSource
... but there are lots of different settings.
thanks

DropDownStyle = DropDownList
Feb 28 '08 #4

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

Similar topics

13
by: Mr. B | last post by:
Here's the situation... You've a combobox with Items already added. Say they look like this (or even lines of text): 10-00-232 10-00-256 10-01-006 10-01-213 10-02-200
1
by: Maurice Mertens | last post by:
Does anyone know how to get an auto-filling combobox on a form? When I add a combobox to a form I can set the DropDownStyle property to DropDownList. This will make the combobox auto-filling. But...
3
by: Maurice Mertens | last post by:
Hi all, In VB.NET you can set the DropDownStyle for a combobox to 'DropDown' or 'DropDownList'. When you set it to DropDownList, it supports auto-fill. But when you set it to 'DropDown', the...
2
by: DBQueen | last post by:
Hi - In my A2K database, I have a form with 2 Unbound Comboboxes, both of which open up forms to a particular record. One of these comboboxes works perfectly. For some reason the 2nd one WILL...
0
by: Andy Bates | last post by:
I've got what at first appears to be a really simple problem. I have a dropdown combobox with a list of names in, the user can enter text into the edit portion or drop the combobox and select a...
7
by: GianPiero Andreis | last post by:
Hello All, let me pose a simple question about combobox and the CB_INSERTSTRING message. Suppose for instance that I already have a combobox handle, how can I declare and use the SendMessage...
9
by: Jason Simard via .NET 247 | last post by:
Hi, Does anyone know a way to make a combobox "read-only", similar to the read-only property of a textbox? In essence, make a combobox readonly...making the combobox text not gray out but be...
30
by: dbuchanan | last post by:
ComboBox databindng Problem == How the ComboBox is setup and used: My comboBox is populated by a lookup table. The ValueMember is the lookup table's Id and the DisplayMember is the text from a...
3
by: Simon van Beek | last post by:
Dear reader, What can be wrong in my ComboBox, the property "Auto Expand" is set to Yes, but by typing in the ComboBox it doesn't expand. Is this because the source of the ComboBox is a...
2
Fary4u
by: Fary4u | last post by:
Hi it's my 1st post in VB, i'm trying to get data from ComboBox & result with MSHFlexGrid it's working fine there is no problem they only thing i need is Another ComboBox & ( result...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.