Using Context Menus
- 4 minutes to read
The following context menus are available to end-users:
Ribbon Popup Menu
Toolbars Popup Menu
Quick Customization Popup Menu
Customizing Popup Menu
In this topic, you will learn how to use them.
Ribbon Popup Menu
End-users can use a built-in Ribbon context menu to perform the following operations:
Customize the Ribbon Quick Access Toolbar‘s content
Obtain access to additional end-user actions
Position the Ribbon Quick Access Toolbar above or below the Ribbon
Minimize the Ribbon
Additionally, you can provide a custom context menu in Ribbon applications using the TdxRibbonPopupMenu control:
Toolbars Popup Menu
The Toolbars Popup Menu, which is displayed below, is activated when an end-user right-clicks a toolbar.
This popup menu contains a list of all toolbars on a form except for toolbars that represent the main menu. Visible toolbars are displayed as checked in the list. Uncheck a toolbar to make it invisible.
The Toolbars Popup Menu allows you to display the Customization Form via the Customize… menu item. It is displayed in the popup menu only when a bar manager‘s CanCustomize property is set to True (by default).
Quick Customization Popup Menu
This menu allows end-users to control the visibility, layout, and appearance of toolbar items. End-users can click the dropdown button (also called quick customization button) located at the end of a toolbar to display the menu.
The dropdown button is hidden if one of the following conditions is met:
A bar manager’s Style property is set to bmsStandard.
A toolbar’s ShowMark property is set to False
A toolbar’s AllowQuickCustomizing property is set to False and all toolbar items are visible.
The Quick Customization Popup Menu includes:
Items that do not fit the toolbar.
The Add or Remove Buttons item whose dropdown contains items associated with toolbar items. Visible toolbar items are checked in this dropdown. End-users can uncheck a dropdown item to hide the associated toolbar item.
The Reset Toolbar and Customize… items that control toolbar customization.
Reset Toolbar
This menu item restores the selected toolbar’s default settings. An item click displays a confirmation message box:
Only settings related to the toolbar’s item links are restored. To restore the toolbar’s size, position, docking style, state, etc., set a bar manager’s UseFullReset property to True.
The Quick Customization Popup Menu displays the Reset Toolbar item only when a bar manager’s AllowReset property is set to True, and the selected toolbar was not created by an end-user. Do one of the following to prohibit the restore operation:
Set the toolbar’s AllowReset property to False to hide the Reset Toolbar item.
Handle a bar manager’s OnBarReset event.
Customize…
This menu item invokes the Customization Form. The Quick Customization Popup Menu displays this item only when a bar manager’s CanCustomize property is set to True. You can set the selected toolbar’s AllowCustomizing property to False to hide the item.
Customizing Popup Menu
An end-user can customize item controls via the Customizing Popup Menu. It is invoked by right-clicking an item control when the Customization Form is displayed.
This menu has a different appearance at design-time. The list below describes all menu items as they appear at runtime. All menu options that correspond to toolbar item link properties. For detailed information, refer to the Customizing Popup Menu help topic.
Reset
Resets the original caption, glyph, paint style and width of the selected toolbar item control.
Delete Link
Removes the selected toolbar item control.
Name
Allows an end-user to change the caption of the selected item control.
Default Style
If active, the selected item control is painted using the default style (corresponds to the psStandard value of the UserPaintStyle property of an item link).
This option is displayed for TdxBarButton items only.
Text Only (Always)
If active, the selected item control is represented only by text (corresponds to the psCaption value of the UserPaintStyle property of an item link).
Text Only (in Menus)
If active, when the selected item control is displayed in a menu, it is represented only by text (corresponds to the psCaptionInMenu value of the UserPaintStyle property of an item link).
Image and Text
If active, the selected item control is represented both by text and an image (corresponds to the psCaptionGlyph value of the UserPaintStyle property of an item link).
This option is displayed for TdxBarButton items only.
Begin a Group
If active, the selected item control follows a separator. Use this option to visually group items on a toolbar.