Is there a way to have a tri-state checkbox on MS office 2016 ribbons?
Asked
Active
Viewed 112 times
-1
-
No, the Ribbon UI doesn't provide that... – Cindy Meister Aug 06 '19 at 11:17
1 Answers
0
Nope. The Fluent UI has a limited number of controls with a pre-defined functionality. You can find all the ribbon UI controls described in the following articles:
- Customizing the 2007 Office Fluent Ribbon for Developers (Part 1 of 3)
- Customizing the 2007 Office Fluent Ribbon for Developers (Part 2 of 3)
- Customizing the 2007 Office Fluent Ribbon for Developers (Part 3 of 3)
The checkBox
control provides the getPressed
callback which returns boolean:
C#: bool GetPressed(IRibbonControl control)
VBA: Sub GetPressed(control As IRibbonControl, ByRef returnValue)
C++: HRESULT GetPressed([in] IRibbonControl *pControl, [out, retval] VARIANT_BOOL *pvarfPressed)
Visual Basic: Function GetPressed(control As IRibbonControl) As Boolean
There is no third state.

Eugene Astafiev
- 47,483
- 3
- 24
- 45