dotnet / winforms

Windows Forms is a .NET UI framework for building Windows desktop applications.
MIT License
4.37k stars 966 forks source link

The ToolStripScrollDownButton should be disabled when displaying and focused on the last dropdown item in order to avoid an exception popping up #6650

Open Olina-Zhang opened 2 years ago

Olina-Zhang commented 2 years ago

Repro steps:

  1. Create a Winforms .Net Core application
  2. Add a toolStrip on the form designer
  3. Add a toolStripDropDownButton on the toolStrip
  4. Add several drop down items under toolStripDropDownButton
  5. In the Form.Designer.cs file, edit height of the this.toolStripDropDownButton1.DropDown.MaximumSize property in order to just display one or a part of one drop down item

Or using attached app: WinFormsApp91.zip

  1. Build and run app, then click ToolStripScrollDownButton to display the last dropdown item

Actual behavior: The ToolStripScrollDownButton is still enabled when displaying the last dropdown item, and in this case, an exception pops up when clicking that ToolStripScrollDownButton again image

DropDown_MaximumSize

Expected behavior: When go through the last dropdown item, the ToolStripScrollDownButton is disabled image

ghost commented 2 years ago

This issue is now marked as "up for grabs", and we’re looking for a community volunteer to work on this issue. If we receive no interest in 120 days, we will close the issue. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!