.NETGURU
AutoComplete ComboBox Problems
Messages   Related Types
This message was discovered on microsoft.public.dotnet.framework.windowsforms.

Post a new message to this list...

Douglas Hirsh
Hi,

I am in the process of writing an autocomplete combobox.
I have seen many examples, but none handle the problem that I
am running into.

The autocomplete functionality works fine. But as soon as I load objects into
the items arraylist, and I set the DisplayMember and ValueMember, I start to
run into problems.

At first everything seems to work fine, but let your mouse be in the path of
the
drop down and everything blows up. What is happening is that instead of the
ComboBox.Text staying at what was typed in the text portion, it changes, in
the background, to the selected item.

What I mean is that the text in the text portion stays the same, but if you
were to Debug.WriteLine(ComboBox.Text); it would state the item that the
mouse was over.
When this happens the autocomplete functions go crazy.

Now the funny thing about this is that it only happens after setting the
DisplayMember and ValueMember. If you don't set these the ComboBox.Text
stays the same in the background as it is in the text portion of the ComboBox.

Have any ideas?

Thanks,
Douglas H. Hirsh, JR.

P.S. I am using VS.NET 2003

Reply to this message...
 
    
Sijin Joseph
Take a look at the source code of these autocomplete combos

http://www.sellsbrothers.com/tools/genghis/
http://www.thecodeproject.com/vb/net/DBAutoCompleteCombo.asp

Sijin Joseph
http://www.indiangeek.net
http://weblogs.asp.net/sjoseph

Douglas Hirsh wrote:
[Original message clipped]

Reply to this message...
 
    
Douglas Hirsh
Hi,

Thanks for the response.

I had already looked at the Genghis project. The second link looked like it
would work at first, but it uses a simple dropdown to keep you from being
able to select on mouseover. The simple dropdownstyle has major drawbacks.
The bug is in the ComboBox.

What I really need is a way to keep the mouse from making a selection in
the dropdown. Does anyone know how to keep the mouse from selecting
an item from the dropdown on mouse over?

Thanks,
Douglas H. Hirsh, JR.

"Sijin Joseph" wrote:

[Original message clipped]

Reply to this message...
 
 
System.Diagnostics.Debug
System.Windows.Forms.ComboBox




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification