RibbonX Controls and Determining Enabled?

  • Thread starter Thread starter TMC
  • Start date Start date
T

TMC

Hey All,

I am aware of the 'Enabled' attributed and associated 'getEnabled' callback.

However, what if I just want to determine if a control in enabled? For
example, I do not want to set its state in XML and I do not want to change
its 'Enabled' property via the callback but, rather, I just want to find out
if it is enabled or not.

With the old CommandBarButtons, one could call the 'Enabled' property to
determine this.

Is there some way to determine if a Ribbon control is enabled?

Thanks
 
Hi,

For a built-in control you can use GetEnabledMso.
Example for paste button.

application.CommandBars.GetEnabledMso("Paste")

Cheers
Andy
 
I am not aware of any way that you can address a control on the ribbon other
than via a callback, when the control is passed to the callback procedure.

HTH
Bob
 
Thanks Andy!

Exactly what I was seeking ;-)



Andy Pope said:
Hi,

For a built-in control you can use GetEnabledMso.
Example for paste button.

application.CommandBars.GetEnabledMso("Paste")

Cheers
Andy
 
Back
Top