Change Ribbon Management at Runtime

I am using the Windows Ribbon Framework in an unmanaged C ++ application in Visual Studio. Can I add a button or other control at runtime? I can configure the tape using IUIFramework :: LoadUI, but after that I cannot change it.

+3
source share
2 answers

It is not possible to add or remove a button at runtime, but you can hide or show a tab or group at runtime using Application Modes and which you can set any button texts and images at runtime.

Thus, you can declare and use multi-purpose buttons that will be displayed only at a given specific application mode and contain certain texts and images defined at run time.

+2
source

You can switch modes at runtime depending on what is defined in the markup. See here for more details :

Once the modes are defined in the markup, they can be easily turned on or off in response to contextual events. In the form mentioned earlier, the application ribbon always starts in default mode 0. After the application is initialized and mode 0 is active, you can change the set of active modes by calling the IUIFramework :: SetModes function.

, - , .

:

ComboBox, SplitButtonGallerty, DropDownGallery InRibbonGallery

, ContextualTabs ApplicationModes () .

, .

, Windows Ribbon Framework, .

+1

Source: https://habr.com/ru/post/1772475/


All Articles