CadRibbonTab
from OpenCAD2D.Plugins import CadRibbonTab
class CadRibbonTab(System.Object) ยท CadRibbonTab in the .NET reference
A tab of the ribbon a plugin adds, as AutoCAD's RibbonTab: panels of buttons. It comes after the Plugins tab and before Settings, in the order the plugins were loaded; with CadRibbonTab.ShowWhen set it is a contextual tab instead, green and shown only while the answer is true.
Constructors
__init__
def __init__(self, id: str, title: str) -> None
Makes a tab.
Properties and fields
Id
@property
def Id(self) -> str
Gets the tab's identity.
Panels
@property
def Panels(self) -> System.Collections.Generic.IList[CadRibbonPanel]
Gets the panels, left to right; read when ICadPluginApplication.Initialize returns.
ShowWhen
@property
def ShowWhen(self) -> System.Func[CadPluginContext, bool] | None
@ShowWhen.setter
def ShowWhen(self, value: System.Func[CadPluginContext, bool] | None) -> None
Gets or sets what makes the tab contextual, as AutoCAD's Text Editor tab is: asked when the selection, the drawing or a command changes, the tab is shown, selected as it appears, while it answers true, and goes with Home selected again when it answers false. Null, until set, for a tab that is always shown. A callback that throws gives false.
Title
@property
def Title(self) -> str
Gets the title on the tab strip.