Need event when menu item is selected (not clicked) #6513
Replies: 2 comments 1 reply
-
It would be great if you could elaborate, qualify and quantify this statement. What exactly is "slow", what is "unstable", and what is "buggy"? Please bear in mind that he Windows Forms consist of two distinct parts:
Any issues with the runtime, fixes, API proposal, etc. are done here. Issues with the designer should be reported via VS Feedback tool (top right corner of VS). For any issues with the Windows Form runtime please search the existing issues, and, if you can't find any open issues related to yours, file them here with a small targeted repro.
Maybe because no one else needed this feature, and the feature itself may be quite niche. |
Beta Was this translation helpful? Give feedback.
-
As suggested in my original post, more details would be provided by posting specific bugs for each issue I encounter. I was told some important work was currently being done on WinForms, so I thought that meant you knew there were issues. If you told me that these were all unknown issues and that the team is interested in this type of feedback, I would considering filing more issues.
Slow means the forms designer. When I bring it up, there is a delay of up to several seconds. And when making changes in the designer, things are sluggish, and it seems to get confused if I go too quickly (see buggy).
I have on several occasions caused Visual Studio to close while using the forms designer. In some cases, it's gives me a critical error if I try to save the form or do anything else to it.
When I switch to a tab with an open form designer, the designer often doesn't appear. The tab shows it has switched, but the window still shows the content from the old tab. The designer has become unstable (unable to do edits or save the form) after renaming things in Solution Explorer, and sometimes when making changes to the menu in the designer.
Yes, it appears to be the designer I'm having issues with.
I thought I just did propose a new feature. Are you saying it will be discarded because I didn't follow the correct template? Not sure exactly what you're saying here.
That's not it because I've found people trying to do workarounds for it. It might not be a common feature, but then again, I don't think menu item tooltips are either. A lot of applications display a description for menu commands in the status bar. There's even a Windows message for it (WM_MENUSELECT). And it was built into MFC. It's a thing. |
Beta Was this translation helpful? Give feedback.
-
I've been working with the new WinForms code. I know the work is ongoing, so I've been avoiding posting all the issues I'm running into. I can if anyone wants. Right now, it seems somewhat slow, unstable and buggy.
But I do have a feature request that is sorely needed: We have an event when menu items are clicked. But there is no event for when menu items are selected. I think this should be added.
I would like to display a description of the selected menu command in the status bar. This is proving extremely difficult without an event for when menu items are selected. I tried using
WndProc
to capture theWM_MENUSELECT
message. But apparently, WinForms doesn't use standard menus and that message is never sent.I also tried an approach that involves setting the
MouseEnter
andMouseLeave
event handlers for every menu. I got this working when menu items are selected by the mouse. But I have yet to find a way to do this when a menu item is selected using the keyboard.It seems like this event wouldn't be hard to add. I really don't understand why it hasn't been added before.
Side Note: If I ever find a way to do this, I thought it might be nice to store the text to be displayed in the menu item's
ToolTipText
property. However, my testing indicates setting this property causes a tool tip to appear (which I wouldn't want if I displayed that text in the status bar). Unfortunately, theShowItemToolTips
property seems to have no bearing on this. (Those tooltips still show after setting that property to false.)Beta Was this translation helpful? Give feedback.
All reactions