We have an application that is using Windows Ribbon Framework for an UI. The app itself is written in Delphi and uses Windows Ribbon Framework for Delphi to interface with the ribbon API.
Our ribbon XML places few commands into the Quick Access toolbar. Use can then remove/add commands either by using the built-in ribbon mechanism (selecting the drop/down button and clicking on a command name) or by selecting More commands
command which opens the configuration dialog.
The problem I've encountered is that I cannot find a way to get the current state of commands in the QA collection (whether they are visible or not).
In the example above (picture) I would like to detect that first five commands are checked and that the last is not so I can prepare the configuration dialog accordingly.
I have no problems enumerating the IUICollection
and accessing the items stored inside. I can also get the UI_PKEY_CommandId
for each item. I cannot, however, find a way to read the checked/unchecked state. I tried reading UI_PKEY_BooleanValue
and UI_PKEY_Enabled
for all items in the collection, but they do not return that state.
I have also tried to monitor IUICommandHandler.UpdateProperty
but it doesn't get called when such item is checked/unchecked (except that it is called with the UI_PKEY_Label
key).
Does ribbon API even support this functionality?
TAction
. Then you can (hopfully) read theTAction.Checked
property. check out (FMain.pas TFormMain.CommandCreated): github.com/TurboPack/RibbonFramework/tree/master/Samples/… – Centra