Articles in this section
Category / Section

How to specify the SuperAccelerator for RibbonPanelMergeContainer in WinForms RibbonControlAdv?

1 min read

SuperAccelerator for RibbonPanelMergeContainer

You can specify the SuperAccelerator for RibbonPanelMergeContainer by using the function named “SetAccelerator” in SuperAccelerator.

C#

//Attach the MDI parent to TabbedMDIManager
tabbedGroupedMDIManager1.AttachToMdiContainer(this);
ChildForm child = new ChildForm();
//To specify the MDI Form
child.MdiParent = this;
child.Show();
child.Activate();
 
// To ensure if RibbonPanelMergeContainer is added to RibbonControlAdv
if (this.ribbonControlAdv1.Header.MainItems.Count > 2)
{
    // To Set SuperAccelerator for RibbonPanelMergeContainer in Child Form
    this.superAccelerator1.SetAccelerator(this.ribbonControlAdv1.Header.MainItems[2], "E");
}
 
// To Set SuperAccelerator for ToolStripItems in Child Form
this.superAccelerator1.SetAccelerator(child.toolStripButton1, "F");
this.superAccelerator1.SetAccelerator(child.toolStripButton2, "G");

VB

'Attach the MDI parent to TabbedMDIManager
tabbedGroupedMDIManager1.AttachToMdiContainer(Me)
Dim child As New ChildForm()
'To specify the MDI Form
child.MdiParent = Me
child.Show()
child.Activate()
 
' To ensure if RibbonPanelMergeContainer is added to RibbonControlAdv
If Me.ribbonControlAdv1.Header.MainItems.Count > 2 Then
    ' To Set SuperAccelerator for RibbonPanelMergeContainer in Child Form
    Me.superAccelerator1.SetAccelerator(Me.ribbonControlAdv1.Header.MainItems(2), "E")
End If
 
' To Set SuperAccelerator for ToolStripItems in Child Form
Me.superAccelerator1.SetAccelerator(child.toolStripButton1, "F")
Me.superAccelerator1.SetAccelerator(child.toolStripButton2, "G")

 

Before specifying the SuperAccelerator to RibbonMergeContainer

Figure 1. Before specifying the SuperAccelerator for RibbonMergeContainer.

After specifying the SuperAccelerator to RibbonMergeContainer

Figure 2. After specifying the SuperAccelerator for RibbonMergeContainer.

Samples:

C#: Ribbon_SuperAccelerator_C#

VB: Ribbon_SuperAccelerator_VB

Reference links:

1. https://help.syncfusion.com/windowsforms/ribbon/ribbon-merge-support

2. 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