dotnet / dotnet/winforms

Utilize Mouse Wheel for scrolling in ToolStripDropDownMenu

Open
#13,302 3 comments 1 reaction 1 assignee Claimed by @JeremyKuhne View on GitHub
area-controls-StripControls
Dominant language
C#
Stars
4.9k
Forks
1.1k
Avg merge
1d 13m
Merged PRs (30d)
85

Description

### .NET version

9.0

### Did it work in .NET Framework?

No

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

No

### Issue description

The mouse wheel can't be used to scroll these menus when they're overflowed.
You have to click the arrow buttons at the Top/Bottom. 🤮

To be clear, I'm talking about overflowed `ToolStripDropDownMenu` like this:
![Image](https://github.com/user-attachments/assets/14622778-61f5-4969-b87d-6eb2a1e01345)

In Paint.NET, these menus can get overflowed easily if a user installs a lot of plugins.

![Image](https://github.com/user-attachments/assets/078bb831-0f49-4dfc-b00e-5fa4b4c2d524)

cc: @rickbrew

### Steps to reproduce

Add many `ToolStripMenuItem` to a DropDown.
For testing, I created a bunch of Menu items like this.

```C#
ToolStripMenuItem[] items = Enumerable
.Range(0, 100)
.Select(x => new ToolStripMenuItem(x.ToString()))
.ToArray();

ToolStripMenuItem testMenu = new ToolStripMenuItem("Test");
testMenu.DropDownItems.AddRange(items);

MenuStrip menuStrip = new MenuStrip();
menuStrip.Items.AddRange(testMenu);

Controls.Add(menuStrip);
```

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.