473,462 Members | 1,491 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Basic ComboBox question

Hi,

I have a ComboBox that contains 1,400 sorted items [don't ask,
management decision :(]. Here's the list:

abba
apple
[...lots of items]...
cabba
caccaa
capple
czar
[...lots of items]...
pheasentHeadOfDeath

Let's say the user is trying to select "capple". The natural thing to do
is to dropdown the listbox and type the first few letters of the item's
name. So the user might type "cap." The behavior is as follows: When the
user hits 'c', 'caba' is selected then the user immediately hits 'a' at
which point 'abba' is selected and then the user hits 'p' and
'pheasentHeadOfDeath' is selected. Is there a way to get the ComboBox to
realize that the user is trying to spell a word and highlight the first item
that begins with 'cap'? If this user waits more than x seconds between
keystrokes, the comboBox would realize that he's searching for a new item. I
can think of ways to program this manually, but I wanted to make sure that
this type of thing wasn't already built into the ComboBox via some sort of
"ComboBoxUnderstandsKeystrokesAsWords" property or something.

David
Nov 15 '05 #1
4 1735
The ComboBox does not have this functionality built in, so you'll have to do
something yourself. See the Genghis CompletionCombo from Sells Brothers for
an example if you want to write your own, or you can use the Genghis's dll
for free if you want:
http://www.sellsbrothers.com/tools/genghis/
"David Sworder" <ds******@cts.com> wrote in message
news:uG**************@tk2msftngp13.phx.gbl...
Hi,

I have a ComboBox that contains 1,400 sorted items [don't ask,
management decision :(]. Here's the list:

abba
apple
[...lots of items]...
cabba
caccaa
capple
czar
[...lots of items]...
pheasentHeadOfDeath

Let's say the user is trying to select "capple". The natural thing to do is to dropdown the listbox and type the first few letters of the item's
name. So the user might type "cap." The behavior is as follows: When the
user hits 'c', 'caba' is selected then the user immediately hits 'a' at
which point 'abba' is selected and then the user hits 'p' and
'pheasentHeadOfDeath' is selected. Is there a way to get the ComboBox to
realize that the user is trying to spell a word and highlight the first item that begins with 'cap'? If this user waits more than x seconds between
keystrokes, the comboBox would realize that he's searching for a new item. I can think of ways to program this manually, but I wanted to make sure that
this type of thing wasn't already built into the ComboBox via some sort of
"ComboBoxUnderstandsKeystrokesAsWords" property or something.

David

Nov 15 '05 #2
The ComboBox does not have this functionality built in, so you'll have to do
something yourself. See the Genghis CompletionCombo from Sells Brothers for
an example if you want to write your own, or you can use the Genghis's dll
for free if you want:
http://www.sellsbrothers.com/tools/genghis/
"David Sworder" <ds******@cts.com> wrote in message
news:uG**************@tk2msftngp13.phx.gbl...
Hi,

I have a ComboBox that contains 1,400 sorted items [don't ask,
management decision :(]. Here's the list:

abba
apple
[...lots of items]...
cabba
caccaa
capple
czar
[...lots of items]...
pheasentHeadOfDeath

Let's say the user is trying to select "capple". The natural thing to do is to dropdown the listbox and type the first few letters of the item's
name. So the user might type "cap." The behavior is as follows: When the
user hits 'c', 'caba' is selected then the user immediately hits 'a' at
which point 'abba' is selected and then the user hits 'p' and
'pheasentHeadOfDeath' is selected. Is there a way to get the ComboBox to
realize that the user is trying to spell a word and highlight the first item that begins with 'cap'? If this user waits more than x seconds between
keystrokes, the comboBox would realize that he's searching for a new item. I can think of ways to program this manually, but I wanted to make sure that
this type of thing wasn't already built into the ComboBox via some sort of
"ComboBoxUnderstandsKeystrokesAsWords" property or something.

David

Nov 15 '05 #3

Hi David,

Thank you for posting in this group.

The ComboBox control does not contain such function.
I think you should create a custom control inherited from the ComboBox,
then you can apply your program logic in your class.

For example, you can handle the ComboBox_TextChanged event, select relevant
element while the customer typing.(But you should set the appropriate
charaters focus of the text).

If you still have any questions, please feel free to let me know.
Hope this helps,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| From: "David Sworder" <ds******@cts.com>
| Subject: Basic ComboBox question
| Date: Fri, 3 Oct 2003 11:10:12 -0700
| Lines: 31
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <uG**************@tk2msftngp13.phx.gbl>
| Newsgroups:
microsoft.public.dotnet.framework.windowsforms,mic rosoft.public.dotnet.langu
ages.csharp
| NNTP-Posting-Host: rrcs-west-66-27-51-213.biz.rr.com 66.27.51.213
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftn gp13.phx.gbl
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.languages.csharp:188822
microsoft.public.dotnet.framework.windowsforms:537 02
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| Hi,
|
| I have a ComboBox that contains 1,400 sorted items [don't ask,
| management decision :(]. Here's the list:
|
| abba
| apple
| [...lots of items]...
| cabba
| caccaa
| capple
| czar
| [...lots of items]...
| pheasentHeadOfDeath
|
| Let's say the user is trying to select "capple". The natural thing to
do
| is to dropdown the listbox and type the first few letters of the item's
| name. So the user might type "cap." The behavior is as follows: When the
| user hits 'c', 'caba' is selected then the user immediately hits 'a' at
| which point 'abba' is selected and then the user hits 'p' and
| 'pheasentHeadOfDeath' is selected. Is there a way to get the ComboBox to
| realize that the user is trying to spell a word and highlight the first
item
| that begins with 'cap'? If this user waits more than x seconds between
| keystrokes, the comboBox would realize that he's searching for a new
item. I
| can think of ways to program this manually, but I wanted to make sure that
| this type of thing wasn't already built into the ComboBox via some sort of
| "ComboBoxUnderstandsKeystrokesAsWords" property or something.
|
| David
|
|
|

Nov 15 '05 #4

Hi David,

Thank you for posting in this group.

The ComboBox control does not contain such function.
I think you should create a custom control inherited from the ComboBox,
then you can apply your program logic in your class.

For example, you can handle the ComboBox_TextChanged event, select relevant
element while the customer typing.(But you should set the appropriate
charaters focus of the text).

If you still have any questions, please feel free to let me know.
Hope this helps,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| From: "David Sworder" <ds******@cts.com>
| Subject: Basic ComboBox question
| Date: Fri, 3 Oct 2003 11:10:12 -0700
| Lines: 31
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <uG**************@tk2msftngp13.phx.gbl>
| Newsgroups:
microsoft.public.dotnet.framework.windowsforms,mic rosoft.public.dotnet.langu
ages.csharp
| NNTP-Posting-Host: rrcs-west-66-27-51-213.biz.rr.com 66.27.51.213
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftn gp13.phx.gbl
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.languages.csharp:188822
microsoft.public.dotnet.framework.windowsforms:537 02
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| Hi,
|
| I have a ComboBox that contains 1,400 sorted items [don't ask,
| management decision :(]. Here's the list:
|
| abba
| apple
| [...lots of items]...
| cabba
| caccaa
| capple
| czar
| [...lots of items]...
| pheasentHeadOfDeath
|
| Let's say the user is trying to select "capple". The natural thing to
do
| is to dropdown the listbox and type the first few letters of the item's
| name. So the user might type "cap." The behavior is as follows: When the
| user hits 'c', 'caba' is selected then the user immediately hits 'a' at
| which point 'abba' is selected and then the user hits 'p' and
| 'pheasentHeadOfDeath' is selected. Is there a way to get the ComboBox to
| realize that the user is trying to spell a word and highlight the first
item
| that begins with 'cap'? If this user waits more than x seconds between
| keystrokes, the comboBox would realize that he's searching for a new
item. I
| can think of ways to program this manually, but I wanted to make sure that
| this type of thing wasn't already built into the ComboBox via some sort of
| "ComboBoxUnderstandsKeystrokesAsWords" property or something.
|
| David
|
|
|

Nov 15 '05 #5

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

Similar topics

10
by: Mr. B | last post by:
I've been seeking the solution to this. But can't figure it out (sounds simple enough). When you Populat a ComboBox, you can select the initial displayed items on startup simply by setting the...
0
by: Tech | last post by:
In Visual Basic 6.0, the Locked property of a ComboBox control determined whether the text-box portion of the control could be edited. In Visual Basic ..NET, the Locked property prevents a control...
7
by: Nicolae Fieraru | last post by:
Hi All, I am trying to change the rowsource of a combobox when I click on it. I played with many events, associated with the form and the combobox, but still haven't figured out what is the way...
2
by: pei_world | last post by:
I want to implement a key hit with enter to dropdown a combobox that is in the datagrid. in this case I need to override its original behaviours. I found some codes from the web. Does anyone know...
6
by: Sakharam Phapale | last post by:
Hi All, How to fill one ComboBox from other ComboBox control? 1) Only setting the reference does the trick but doesn't show items in control. If you see in immediate window, it shows...
5
by: Aussie Rules | last post by:
Hi, Having a mental block on this one. Have done it before but can't rack my brain on how... I have an object, with a bunch on property, and I add that object to a combo box. I want the...
0
by: Aziz | last post by:
1. If I create a sorted DataView object from a DataSet table, how do I reference the sorted elements? (Say I want to output the CustomerName for the first row in the sorted DataView to a label or...
0
by: evlpupy | last post by:
Good Afternoon I have need of assistance for programming a visual basic form in excel. In excel I have 3 named ranges TM Agents1 Agents2 In the TM range I have 5 different names of...
2
by: stanford1608 | last post by:
Hi, I'm new to setting up access data bases and have just had a project thrown on my desk. I have become stuck with the following: 1) I have a table (contact_how) and it is one column with...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
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
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.