DS Server

Javascript: SideBarToggleButton.setCurrentSideBar Method

Method|Introduced in 30.0

Description

Sets the side bar which is shown in the side bar toggle / drop down button at the top right of the ribbon bar.

Syntax

<void> SideBarToggleButton.setCurrentSideBar(<SideBarType> value, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
value

A bitwise combination of one or more SideBarType values.

callback

Optional. Is called when the operation completed.

errorCallback

Optional. Is called when the operation failed with an error.

Examples

The following example demonstrates SideBarToggleButton.setCurrentSideBar in a practical document-editing workflow. It sets the side bar which is shown in the side bar toggle / drop down button at the top right of the ribbon bar.

function onTxError(error) {
    console.error("TX Text Control error:", error.msg);
    error.handled = true;
}

TXTextControl.sideBarToggleButton.setCurrentSideBar(
    TXTextControl.SideBarType.TrackChanges,
    function() {
        console.log("set current side bar completed.");
    },
    onTxError
);