TX Text Control .NET Server

RulerBarViewGenerator Object

Object|Introduced in 30.0

Description

Provides functions and properties for requesting properties and executing server side methods for a ruler bar.

Syntax

RulerBarViewGenerator

Examples

The following example demonstrates RulerBarViewGenerator in a practical document-editing workflow. It provides functions and properties for requesting properties and executing server side methods for a ruler bar.

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

TXTextControl.rulerBar.getBorderStyle(
    function(borderStyle) {
        if (!borderStyle) {
            console.warn("No ruler bar border style was returned.");
            return;
        }
        
        console.log("get border style result:", borderStyle);
    },
    onTxError
);

Members

Properties

PropertyDescription
displayColorsThe displayed colors of the ruler bar.

Methods

MethodDescription
getBorderStyleGets the border style of the ruler bar.
getEnablePageMarginsGets whether page margins can be set via the ruler bar.
getFormulaModeGets the formula mode of the ruler bar.
getReadOnlyGets a value determining the ruler bar's read only mode. When the ruler bar is set to read only, it still shows all formatting attributes of the connected TextControl, but formatting attributes cannot be changed.
getScaleUnitGets the scale unit of the ruler bar.
resetDisplayColorsResets all display colors of a ruler bar to their system dependent default values.
setBorderStyleSets the border style of the ruler bar.
setEnablePageMarginsSets whether page margins can be set via the ruler bar.
setFormulaModeSets the formula mode of the ruler bar.
setReadOnlySets a value determining the ruler bar's read only mode. When the ruler bar is set to read only, it still shows all formatting attributes of the connected TextControl, but formatting attributes cannot be changed.
setScaleUnitSets the scale unit of the ruler bar.