DS Server

SideBarToggleButton Object

Object|Introduced in 30.0

Description

The sidebar toggle button shown at the top right of the ribbon.

Syntax

{
   setAllowedSideBars: <function>,
   getAllowedSideBars: <function>,
   setCurrentSideBar: <function>,
   getCurrentSideBar: <function>
}

Examples

The following example demonstrates SideBarToggleButton in a practical document-editing workflow. The sidebar toggle button shown at the top right of the ribbon.

function inspectSideBarToggleButton(sideBarToggleButton) {
    console.log("set allowed side bars:", sideBarToggleButton.setAllowedSideBars);
    console.log("get allowed side bars:", sideBarToggleButton.getAllowedSideBars);
    console.log("set current side bar:", sideBarToggleButton.setCurrentSideBar);
    console.log("get current side bar:", sideBarToggleButton.getCurrentSideBar);
}

Members

Methods

MethodDescription
getAllowedSideBarsReturns the side bars which are currently shown in the side bar toggle / drop down button at the top right of the ribbon bar.
getCurrentSideBarReturns the side bar which is shown in the side bar toggle / drop down button at the top right of the ribbon bar.
setAllowedSideBarsSets the side bars which are shown in the side bar toggle / drop down button at the top right of the ribbon bar. The value TXTextControl.SideBarType.None or 0 removes the button altogether.
setCurrentSideBarSets the side bar which is shown in the side bar toggle / drop down button at the top right of the ribbon bar.