dotnet / dotnet/winforms

The height of the "DropDown" list for the combobox control can't be reset default height after called the " comboBox1.Items.Clear();" method

Open
#339 8 comments 0 reactions 0 assignees View on GitHub
:beetle: bug :construction: work in progress help wanted
Dominant language
C#
Stars
4.9k
Forks
1.1k
Avg merge
20h 23m
Merged PRs (30d)
103

Description

**OS** : RS4 X64+.Net 4.8.03316
**VS** : Dev16 d16.0stg 16.0 Preview 3 28505.103

**More info:**
1. This issue can reproduce from VS Dev10 to Dev16.
2. This issue can't reproduce when adding the following code to Form1.Designer.cs.
```
comboBox1.Items.AddRange(new object[] { "a", "b", "c", "d", "e" });
comboBox1.Items.Clear();
```
**Steps to reproduce:**
1. Create a Winforms application.
2. Drag a Combobox control to form designer.
3. Add the following code to Form1.cs.
```
private void Form1_Load(object sender, EventArgs e)
{
comboBox1.Items.AddRange(new object[] { "a", "b", "c", "d", "e" });
comboBox1.Items.Clear();
}
```
**Actual:**
The height of the "DropDown" list for the combobox control can't be reset default height after called the " comboBox1.Items.Clear();" method.
![image](https://user-images.githubusercontent.com/45864649/51449528-6b448380-1d67-11e9-9549-e6e17359c988.png)

**Expected:**
The height of the "DropDown" list for the combobox control should be reset default height after called the " comboBox1.Items.Clear();" method.
![image](https://user-images.githubusercontent.com/45864649/51449518-61bb1b80-1d67-11e9-8240-5ab5d7b5f8ae.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.