Skip to content

Weird display when hovering to ToolStripComboBox drop down arrow #11760

Closed

Description

@Syareel-Sukeri

.NET version

9.0.100-preview.7.24371.4 with dlls built from winforms repo of main branch. It cannot be reproduced with .NET SDK.

Did it work in .NET Framework?

No

Did it work in any of the earlier releases of .NET Core or .NET 5+?

Yes, this is a regression issue. Not reproduce on .NET 8.0

Issue description

When hovering over drop-down arrow of ToolStripComboBox, an additional blue hover effect appears outside the icon. This issue can only be reproduced with ToolStripComboBox which is in ContextMenuStrip, ToolStrip, MenuStrip. The issue cannot be reproduced with normal ComboBox.

ToolStripComboBox.mp4

Steps to reproduce

  1. Create a WinForms .NET 9.0 project.
  2. Add a ToolStrip component to the form.
  3. Click the drop-down arrow on the ToolStrip to open the list of available items.
  4. Choose ComboBox from the list to add it to the ToolStrip.
  5. Build and run project.
  6. Hover to drop-down arrow of the ToolStripComboBox and observe the result.

Activity

  1. added
    untriaged
    💥 regression-preview
    on Jul 26, 2024
  2. Olina-Zhang commented on Jul 26, 2024

    @Olina-Zhang
    Member

    Give a screenshot of expected result and actual result:
    image

  3. LeafShi1 commented on Jul 26, 2024

    @LeafShi1
    Member

    In order to make the combo button look thinner, ToolStripComboBox was redrawn based on the original ComboBox. The original button was drawn in two parts (_dropDownRect and _whiteFillRect), and PR #11529 canceled the redrawing of the entire comboBox when the mouse hovered to solve the flickering problem, which caused this problem.

    image

    There are two solutions

    1. When the target control is ToolStripComboBox, revert the changes of PR Issue 2053861 fix combo box flickering issue #11529, but this will redraw the entire comboBox when the mouse hovers, it will cause flickering.
      KeepSmallButton

    2. No longer redraw the ToolStripComboBox, so that its appearance is consistent with the normal ComboBox
      RemoveSmallButton

    I submitted a PR #11761, commit1 adopted solution 1, and commit2 adopted solution 2

    What modification do you think is more appropriate? Please give me some suggestions

    @Tanya-Solyanik

  4. removed
    untriaged
    on Jul 26, 2024
  5. self-assigned this
    on Jul 26, 2024
  6. added
    💥 regression-release
    and removed
    💥 regression-preview
    on Jul 26, 2024
  7. Tanya-Solyanik commented on Jul 26, 2024

    @Tanya-Solyanik
    Contributor

    @LeafShi1 - changing width of the DropDown button in ToolStripComboBox will be a breaking change as it will leave less room for the content and somebody's text will get truncated. Unfortunately we should partially revert the "flickering fix", i.e. go with commit 1

  8. added
    💥 regression-preview
    and removed
    💥 regression-release
    on Jul 26, 2024
  9. added this to the 9.0 RC1 milestone on Jul 26, 2024
  10. added
    🚧 work in progress
    on Aug 1, 2024
  11. Philip-Wang01 commented on Aug 8, 2024

    @Philip-Wang01
    Contributor

    Verified this issue in the latest .NET 9.0.100-rc.1.24407.33, it was fixed: No additional blue hover effect appears outside the icon.

    test11760.mp4
  12. Nora-Zhou01 commented on Aug 26, 2024

    @Nora-Zhou01
    Contributor

    Verified the issue with .NET 9.0.100-rc.1.24422.10 test pass build that the issue has been fixed, which have the same results as above.

  13. locked and limited conversation to collaborators on Oct 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

💥 regression-preview🚧 work in progress

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions