Question

I'm using the Windows Ribbon Framework for Delphi. The documentation says that the TAB command is of type TUICommandAnchor command class, and that "these command classes provide no additional properties or events to the TUICommand base class". However, I saw that the TUICommandAnchor has the property [TUICommandAnchor].TActionLink.Action that is the same as for TUICommandAction and serves to inform the callback function's name to call when click on it. I created an Action and entered the name of the event in TActionLink.Action property and did not work. Does anyone know if there is any event that is triggered when clicking the TAB on Ribbon?

Regards.

Was it helpful?

Solution

Unfortunately, the Windows Ribbon Framework API is very sparing in what it exposes to the application.

For example, you cannot read ribbon button captions programmatically using the "Caption" property from the abstract base class. On the other hand, it works without problems setting these properties from your application. From what I have experienced so far, it's kind of the same with events. You won't recognize that a tab has changed as the regarding interface method IUICommandHandler::Execute is never executed by the API. This isn't something related to the Delphi implementation but to the API itself.

The MSDN article on tabs doesn't mention anything on the execute method either:

http://msdn.microsoft.com/en-us/library/windows/desktop/dd940507(v=vs.85).aspx

At the end I think there is no clean way or at least no way using the API directly to get notified about tab changing events.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top