Articles in this section
Category / Section

How to assign SuperAccelerator to the WinForms RibbonControlAdv Items?

1 min read

Super Accelerator

In the RibbonControlAdv, the SuperAccelerator can be enabled for all its components. You can use the following functions to assign the SuperAccelerator elements to all of the RibbonControlAdv items. They are,

  1. SetMenuButtonAccelerator.
  2. SetAccelerator.
  3. Accelerator.

SetMenuButtonAcceletor - The SetMenuButtonAccelerator function helps you to specify the SuperAccelerator in the MenuButton of the RibbonControlAdv.

SetAccelerator - The SetAccelerator function helps you to specify the SuperAccelerator in all of the ToolStrip items.

Accelerator - The Accelerator property helps you to specify the SuperAccelerator in the BackStage items. In order to show the super accelerator in the BackStageView, the SuperAccelerator should be attached to the BackStage by using the SuperAccelerator property.

C#

//Sets the SuperAccelerator for the RibbonControlAdv MenuButton.
this.superAccelerator1.SetMenuButtonAccelerator(this.ribbonControlAdv1, "F");
// Sets the SuperAccelerator for the ToolStripTabItems.
this.superAccelerator1.SetAccelerator(this.toolStripTabItem1, "H");
this.superAccelerator1.SetAccelerator(this.toolStripTabItem2, "D");
this.superAccelerator1.SetAccelerator(this.toolStripTabItem3, "V");
this.superAccelerator1.SetAccelerator(this.toolStripTabItem4, "P");
this.superAccelerator1.SetAccelerator(this.toolStripTabItem5, "T");
//Sets the SuperAccelerator for the BackStage Items.
this.backStageTab1.Accelerator = "I";
this.backStageTab2.Accelerator = "O";

VB

'Sets the SuperAccelerator for the RibbonControlAdv MenuButton.
Me.superAccelerator1.SetMenuButtonAccelerator(Me.ribbonControlAdv1, "F")
'Sets the SuperAccelerator for the ToolStripTabItems.
Me.superAccelerator1.SetAccelerator(Me.toolStripTabItem1, "H")
Me.superAccelerator1.SetAccelerator(Me.toolStripTabItem2, "D")
Me.superAccelerator1.SetAccelerator(Me.toolStripTabItem3, "V")
Me.superAccelerator1.SetAccelerator(Me.toolStripTabItem4, "P")
Me.superAccelerator1.SetAccelerator(Me.toolStripTabItem5, "T")
'Sets the SuperAccelerator for the BackStage Items.
Me.backStageTab1.Accelerator = "I"
Me.backStageTab2.Accelerator = "O"

 

SuperAccelerator specified for ToolStripTab items

Figure 1: SuperAccelerator specified for ToolStripTab items

SuperAccelerator specified for ToolStripTab buttons

Figure 2: SuperAccelerator specified for ToolStrip Buttons

SuperAccelerator specified for backstage items

Figure 3: SuperAccelerator specified for BackStage items

Samples:

C#: Ribbon_SuperAccelerator_C#

VB: Ribbon_SuperAccelerator_VB

Reference link: https://help.syncfusion.com/windowsforms/ribbon/keyboard-support

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied