Share via


RibbonGroup.DialogLauncherClick Event (2007 System)

Occurs when the user clicks the Ribbon dialog launcher icon in the group.

Namespace:  Microsoft.Office.Tools.Ribbon
Assembly:  Microsoft.Office.Tools.Common.v9.0 (in Microsoft.Office.Tools.Common.v9.0.dll)

Syntax

'Declaration
Public Event DialogLauncherClick As EventHandler(Of RibbonControlEventArgs)
'Usage
Dim instance As RibbonGroup 
Dim handler As EventHandler(Of RibbonControlEventArgs)

AddHandler instance.DialogLauncherClick, handler
public event EventHandler<RibbonControlEventArgs> DialogLauncherClick
public:
 event EventHandler<RibbonControlEventArgs^>^ DialogLauncherClick {
    void add (EventHandler<RibbonControlEventArgs^>^ value);
    void remove (EventHandler<RibbonControlEventArgs^>^ value);
}
JScript does not support events.

Remarks

The Ribbon dialog launcher is a small icon that appears in the group. When the user clicks this icon, you can handle the DialogLauncherClick event to open a custom dialog box. By default, groups do not have a Ribbon dialog launcher. For more information, see How to: Add a Dialog Box Launcher to a Ribbon Group.

Examples

The following example shows how to add a dialog box launcher to a ribbon group and how to launch a custom dialog that enables users to choose advanced settings when they click on the RibbonDialogLauncher icon in the lower right corner of the RibbonGroup.

To run this code example, you must first perform the following steps:

  1. Add a Ribbon (Visual Designer) item to a Visual Studio Tools for Office project.

  2. Add a RibbonDialogLauncher to the default group as outlined in How to: Add a Dialog Box Launcher to a Ribbon Group.

  3. If you are using Visual Basic, add a new Windows Form Dialog item to the project. If you are using C#, add a new Windows Form item and turn it into a dialog by adding an OK and Cancel button to the form and creating event handlers for the buttons' click events.

  4. Set the (Name) property of the dialog to advancedSettingsDialog. You can customize the dialog by adding controls and setting more properties.

  5. Add the DialogLauncherClick event handler to your code.

  6. Place the contents of the following method into the DialogLauncherClick event handler.

Private Sub Group1_DialogLauncherClick(ByVal sender As Object, ByVal e As Microsoft.Office.Tools.Ribbon.RibbonControlEventArgs) Handles Group1.DialogLauncherClick
    Dim dlg As advancedSettingsDialog = New advancedSettingsDialog()
    dlg.ShowDialog()
End Sub
void group1_DialogLauncherClick(object sender, Microsoft.Office.Tools.Ribbon.RibbonControlEventArgs e)
{
    advancedSettingsDialog dlg = new advancedSettingsDialog();
    dlg.ShowDialog();
}

.NET Framework Security

See Also

Reference

RibbonGroup Class

RibbonGroup Members

Microsoft.Office.Tools.Ribbon Namespace

Other Resources

How to: Add a Dialog Box Launcher to a Ribbon Group