DS Server

Javascript: TXTextControl.RulerBarScaleUnit Enumeration

Enumeration|Introduced in 30.0

Description

Specifies whether a ruler bar shows cell references when the current input position is in a table cell.

Members

MemberDescription
AutoThe ruler is automatically scaled in inch or in millimeter depending on the currently set culture.
MillimeterThe ruler bar is scaled in centimeter including millimeter marks.
CentimeterThe ruler bar is scaled in centimeter without millimeter marks.
InchThe ruler bar is scaled in inch.

Examples

The following example uses TXTextControl.RulerBarScaleUnit.Auto (the ruler is automatically scaled in inch or in millimeter depending on the currently set culture.) in a document-editing workflow.

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

TXTextControl.rulerBar.setScaleUnit(
    TXTextControl.RulerBarScaleUnit.Auto,
    function() {
        console.log("set scale unit completed.");
    },
    onTxError
);