Skip to content

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

Closed

Description

@Jessie-Zhang01

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

Expected:
The height of the "DropDown" list for the combobox control should be reset default height after called the " comboBox1.Items.Clear();" method.
image

Activity

  1. OliaG commented on Jan 22, 2019

    @OliaG
    Contributor

    Seems this is not an issue, the Actual result is the desired. If we drag-and-drop empty combobox, we'll get the same Actual result.

  2. Jessie-Zhang01 commented on Jan 23, 2019

    @Jessie-Zhang01
    Author

    @OliaG Sorry, I reversed the actual result and expected result when reporting it. The correct result has been updated in above reproduce steps. Could you please review again and triage it to see if it is a real issue? If yes, please reactive the bug, due to I don't have permission to change it.

  3. Jessie-Zhang01 commented on Jan 30, 2019

    @Jessie-Zhang01
    Author

    @OliaG @merriemcgaw Could you please help to review this issue again if need to reactivate it?

  4. Jessie-Zhang01 commented on Apr 9, 2020

    @Jessie-Zhang01
    Author

    This issue still reproduce on .Net Core 5.0.100-preview.4.20208.26.

  5. RussKie commented on Apr 9, 2020

    @RussKie
    Contributor

    Can you please supply a repro project.

  6. added
    🪲 bug
    on Apr 9, 2020
  7. added this to the 5.0 milestone on Apr 9, 2020
  8. Jessie-Zhang01 commented on Apr 9, 2020

    @Jessie-Zhang01
    Author

    Of course, you can use the following project to reproduce this issue:
    ComboBox.zip

  9. RussKie commented on Apr 14, 2020

    @RussKie
    Contributor

    @Jessie-Zhang01 I tried the example in net45 and net472 and it appears to be behaving the same way.... Can you please confirm this is an existing behaviour in .NET Framework?

  10. modified the milestones: 5.0, Future on Apr 14, 2020
  11. added
    waiting-author-feedback
    on Apr 14, 2020
  12. Jessie-Zhang01 commented on Apr 14, 2020

    @Jessie-Zhang01
    Author

    @RussKie Yes, this issue also reproduce on .Net Framework. And this issue was associated with vs feedback item: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/759614

  13. ghost removed
    waiting-author-feedback
    on Apr 14, 2020
  14. added
    help wanted
    on Apr 14, 2020
  15. added
    🚧 work in progress
    on Jun 17, 2026
  16. Zheng-Li01 commented on Oct 30, 2026

    @Zheng-Li01
    Member

    Verified the issue with private dlls built from main branch of dotnet/winforms repo + .NET SDK 11.0.100-rc.3.26522.148 build, the issue has been fixed as below screenshot.
    Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    🪲 bug🚧 work in progresshelp wanted

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions