Having trouble getting help?
Contact Support
Contact Support
Keyboard Shortcuts in Windows Forms xp toolbar (XPToolbar)
29 Apr 20211 minute to read
The bar items can be selected through keyboard operation by specifying the shortcuts via the Shortcut
property of each item.
NOTE
- By using this keyboard shortcuts, we can access the bar items functionality through
Click
event.- In this illustration, we have used BarItem. Similarly, we have set the shortcuts for ParentBarItem, DropDownBarItem, ComboBoxBarItem, ListBarItem, StaticBarItem, ToolbarListBarItem and TextBoxBarItem.
The below code snippet shows how shortcut is assigned to the bar item.
this.barItem1.Shortcut = System.Windows.Forms.Shortcut.CtrlN;
Me.barItem1.Shortcut = System.Windows.Forms.Shortcut.CtrlN
User can also specify custom text in place of keyboard shortcuts region using the ShortcutText
property.
this.barItem1.Shortcut = System.Windows.Forms.Shortcut.CtrlN;
this.barItem1.ShortcutText = "Press Ctrl + N";
Me.barItem1.Shortcut = System.Windows.Forms.Shortcut.CtrlN
Me.barItem1.ShortcutText = "Press Ctrl + N"