Javascript: TXTextControl.RulerBarScaleUnit Enumeration
Description
Specifies whether a ruler bar shows cell references when the current input position is in a table cell.
Members
| Member | Description |
|---|---|
| Auto | The ruler is automatically scaled in inch or in millimeter depending on the currently set culture. |
| Millimeter | The ruler bar is scaled in centimeter including millimeter marks. |
| Centimeter | The ruler bar is scaled in centimeter without millimeter marks. |
| Inch | The 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
);