473,749 Members | 2,402 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1219

"Mark" <Ma**@discussio ns.microsoft.co m> wrote in message
news:F8******** *************** ***********@mic rosoft.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
3928
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 automatically select the first available selection. If I make the ComboBox visible before setting the .SelectedText to "" and
9
22764
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 automatically select the first available selection. If I make the ComboBox visible before setting the .SelectedText to "" and
0
1756
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 the next version. Here are instructions how to do it: http://support.microsoft.com/default.aspx?scid=kb;en-us;320107 There is one bug, though.
5
3190
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 the value and displaymember properties. This works fine. My combobox contains the correct data. However I'm also binding my SelectedValue property to a column in a datatable. Here's where I'm lost. The combobox doesn't show the correct
3
7519
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 on. It's a simple program that loads a control onto a form and binds "Foo" against a combobox ("SelectedItem") for it's "Bar" property and a datetimepicker ("Value") for it's "DateTime" property. The DateTimePicker.Visible value is set to...
0
8997
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8833
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9389
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9335
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6801
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6079
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4709
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4881
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2794
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.