Hi!
I am trying to figure out how to control right click options on ribbon. For example when I right click on the ribbon it gives me 3 choices. To add to quick access toolbar, to show quick access toolbar below the ribbon, and to minimize the ribbon.
Does anyone know how to disable these or add custom ones?
Thanks!
How do I control right click options on Ribbon?
Re: How do I control right click options on Ribbon?
You cannot add custom items to those menus, but you can remove (hide) items and change (localize) captions.
Items visibility depends on the following Ribbon properties (here are values to show all menu items, see images below):



To hide "More Commands..." and "Customize Quick Access Toolbar...":
To hide "Show QAT Below (Above) the Ribbon":
To hide captions of QAT buttons ("New", "Open" and so on) and "Add to (Remove from) QAT" item:
To hide "Minimize the Ribbon":
To change (localize) captions you need to use LocalizeString method of the CommandBarsManager object. Below are images with changed captions (you can also see there indexes that has to be passed to the LocalizeString method to change/localize specific caption):



Items visibility depends on the following Ribbon properties (here are values to show all menu items, see images below):
Code: Select all
Ribbon.DisableCustomize = .F.
Ribbon.AllowQuickAccessToolbarCustomization = .T.
Ribbon.AllowQuickAccessToolbarPositionChange = .T.
Ribbon.AllowMinimize = .T.



To hide "More Commands..." and "Customize Quick Access Toolbar...":
Code: Select all
Ribbon.DisableCustomize = .T.
Code: Select all
Ribbon.AllowQuickAccessToolbarPositionChange = .F.
Code: Select all
Ribbon.AllowQuickAccessToolbarCustomization = .F.
Code: Select all
Ribbon.AllowMinimize = .F.



With best regards,
Alex Grigorjev
(ARG-Software Design Lab.)
Alex Grigorjev
(ARG-Software Design Lab.)