Office 功能区中的三态复选框
Tristate checkbox in Office ribbon
有没有办法在 MS Office 2016 功能区上设置三态复选框?
没有。 Fluent UI 具有数量有限且具有预定义功能的控件。您可以在以下文章中找到所有功能区 UI 控件:
- 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)
checkBox
控件提供 getPressed
回调,其中 returns 布尔值:
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
没有第三种状态。
有没有办法在 MS Office 2016 功能区上设置三态复选框?
没有。 Fluent UI 具有数量有限且具有预定义功能的控件。您可以在以下文章中找到所有功能区 UI 控件:
- 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)
checkBox
控件提供 getPressed
回调,其中 returns 布尔值:
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
没有第三种状态。