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

ComboBox BUG! Any fixes?

I have a bug with combobox which is reproduced by the following steps:

Create a form with a Tabcontrol and two tabs.
On one tab place a combo box and give it the entries one, two and three.
Change the anchor property of the combo to anything other than the default.
Leave all other properties alone.
Run the app. fill the combo with 't' switch tabs and switch back.
The text in the combo now says three
(it should just say 't')

Any help in solving this would be much appreciated.

Thanks!

Feb 16 '06 #1
3 1196

"Mark" <Ma**@discussions.microsoft.com> wrote in message
news:F8**********************************@microsof t.com...
I have a bug with combobox which is reproduced by the following steps:

Create a form with a Tabcontrol and two tabs.
On one tab place a combo box and give it the entries one, two and three.
Change the anchor property of the combo to anything other than the
default.
Leave all other properties alone.
Run the app. fill the combo with 't' switch tabs and switch back.
The text in the combo now says three
(it should just say 't')

Any help in solving this would be much appreciated.

Thanks!

You don't say which version/edition of Visual Studio you are using, nor the
project type. I tried to reproduce your symptom using Visual Studio 2005,
Professional Edition to create a VB Windows project. I was unable to produce
the results you describe. When I switched back to the tab with the combo
box, the 't' I entered was still displayed.
However, if I do the same thing using Visual Studio .NET 2003, Professional
Edition, I produce a symptom similar to yours. After entering 't' in the
combo box and switching tabs, I see "two" displayed. If I type 'o' into the
combo box and switch, "one" is displayed.
Other results:
Entered Displayed After Switching Tabs
"tw" "two"
"th" "three"
"on" "one"
"oneaa" "oneaa"
"twenty" "two"
So, it appears that the combo box is refreshing itself based on a character
by character comparison of the text property with items in the items
collection and substituting if the text property contains a substring of one
of the items.
It would appear to be a bug that has been fixed in VS 2005.
Unfortunately, I don't have a "fix". Hopefully, somebody else can shed more
light.

--
Peter [MVP Visual Developer]
Jack of all trades, master of none.
Feb 16 '06 #2
hi Peter

Thanks for the reply - yes big oops regarding the missing version
information - we are indeed using VS 2003. Unfortunately moving to 2005 isn't
a viable option at the moment due to the size of our project.

Looks like it has something to do with the resize event, i.e. anchoring the
combo left and right and just place on a form, type 't' and all is ok until
the form is resized and it goes wrong. We have tried subclassing and
overriding the anchor property and working the resize of the control
ourselves - this has resolved the tab situation but the resize on a form
still goes wrong.
Feb 16 '06 #3
hi Peter

Thanks for the reply - yes big oops regarding the missing version
information - we are indeed using VS 2003. Unfortunately moving to 2005 isn't
a viable option at the moment due to the size of our project.

Looks like it has something to do with the resize event, i.e. anchoring the
combo left and right and just place on a form, type 't' and all is ok until
the form is resized and it goes wrong. We have tried subclassing and
overriding the anchor property and working the resize of the control
ourselves - this has resolved the tab situation but the resize on a form
still goes wrong.
Feb 16 '06 #4

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

Similar topics

9
by: Programatix | last post by:
Hi, I'm having problem with ComboBox. I'm trying to force the ComboBox select nothing by doing this, myCombo.SelectedText = "" myCombo.SelectedIndex = -1 but in vain, as the ComboBox will...
9
by: Programatix | last post by:
Hi, I'm having problem with ComboBox. I'm trying to force the ComboBox select nothing by doing this, myCombo.SelectedText = "" myCombo.SelectedIndex = -1 but in vain, as the ComboBox will...
0
by: peter78 | last post by:
I wanted to implement an autocomplete feature on the combobox where you would type in partial text and it would try to match it for you. It doesn't exist in .Net yet, but I'm guessing it will in...
5
by: Peter M. | last post by:
I'm struggling with combobox databinding with something I consider a bug... I'm binding my combobox to an array of structs. The struct exposes two public properties, ID and Name, to be used as...
3
by: Simon Tamman | last post by:
I've come across an interesting bug. I have workarounds but i'd like to know the root of the problem. I've stripped it down into a short file and hope someone might have an idea about what's going...
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...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: 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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.