TX Text Control .NET Server

Javascript: InputPosition.ScrollPosition Enumeration

Enumeration|Introduced in 28.0

Description

Determines a position to where the input position is scrolled.

Members

MemberDescription
AutoScrolls the current input position into the visible part of the document using a default position depending on the previous position.
LeftScrolls the input position to the left side of the visible portion of the document
RightScrolls the input position to the right side of the visible portion of the document.
TopScrolls the input position to the top of the visible portion of the document.
BottomScrolls the input position to the bottom of the visible portion of the document.

Examples

The following example uses TXTextControl.Inputposition.ScrollPosition.Auto (scrolls the current input position into the visible part of the document using a default position depending on the previous position.) in a document-editing workflow.

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

TXTextControl.footnotes.elementAt(0, function(footnote) {
    if (!footnote) {
        console.warn("No footnote is available.");
        return;
    }

    footnote.scrollToPosition(
        TXTextControl.Inputposition.ScrollPosition.Auto,
        function() {
            console.log("scroll to position completed.");
        },
        onTxError
    );
}, onTxError);