"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.