TX Text Control .NET Server

ToolbarButton Class

Class

Description

Configurable toolbar button for use as a custom toolbar item.

Syntax

ToolbarButton

Examples

The following example demonstrates ToolbarButton in a practical Document Viewer workflow. This object provides functionalities for controlling the button of the toolbar.

function configureApproveButton(toolbarButton) {
    toolbarButton.title = "Approve document";
    toolbarButton.onclick = () => console.log("Document approved.");
    toolbarButton.enable();
    toolbarButton.show();
}

Members

Properties

PropertyDescription
imageURL assigned to the button image.
nameName assigned to the item. If no name is assigned, the constructor name is used.
onclickClick callback, or `null` when no action is assigned.
srcAlias for image.
titleTooltip text displayed for the toolbar item.

Methods

MethodDescription
activateApplies the active visual state.
createElementReturns the element inserted into a toolbar. Repeated calls return the same element.
deactivateRemoves the active visual state.
disableDisables interaction with the toolbar button.
enableEnables interaction with the toolbar button.
hideHides the complete toolbar item.
isActiveReports whether the toolbar button has its active visual state.
showShows the complete toolbar item.