0
votes

As the title, it is a strange issue. When I add some items to the combobox as below and set its style to DropDownList:

        this.comboBox1.Items.Add("a");
        this.comboBox1.Items.Add("b");
        this.comboBox1.Items.Add("c");
        this.comboBox1.Items.Add("d");
        this.comboBox1.Items.Add("e");
        this.comboBox1.DropDownStyle=ComboBoxStyle.DropDownList;

When you run the windows form application and double click any blank area in the form around this combobox (do not double click on combobox), the selection will automatically become to c as below:

combobox start with "c"

Is that a magic character in the combobox? It drove me crazy! Is there anyone could help me?

Thanks,

1
do you want double click the form where ever, then ComboBox select automatically "C" ? rightNeo Vijay
Something different is at play here. Check your event handlersSteve
can you create a minimal, compilable sample project? I've never encountered such behavior in over 7 years of development in winforms.Zohar Peled
Agreed. I can't reproduce the symptom. Create a new project with just a ComboBox and that code and see if it still occurs...Idle_Mind
Thanks for all of you. I got the answer. It was an translate software in my background grab the double click event and make this happen. However, I do not know why that software make this happen.capcom923

1 Answers

0
votes

An translate software in my background grab the double click event and make this happen.

Kill that translate software, this issue will not happen.

Thanks,