C# 在运行时为contextstrip项提供快捷键
我正在运行时向上下文条添加一个项目列表。是否可以在运行时为这些项目添加快捷键…假设您使用的是C# 在运行时为contextstrip项提供快捷键,c#,C#,我正在运行时向上下文条添加一个项目列表。是否可以在运行时为这些项目添加快捷键…假设您使用的是MenuItems,您只需为它们指定: 您可能还希望将ShowShortcut属性设置为true,以便快捷方式显示在菜单项旁边 var menuItem = contextMenu.MenuItems[0]; menuItem.Shortcut = Shortcut.CtrlS;
MenuItem
s,您只需为它们指定:
您可能还希望将ShowShortcut
属性设置为true,以便快捷方式显示在菜单项旁边
var menuItem = contextMenu.MenuItems[0];
menuItem.Shortcut = Shortcut.CtrlS;