TX Text Control .NET Server

Javascript: FrameBase.setMoveable Method

Method|Introduced in 28.0

Description

Sets whether a frame can be moved in the document at run time with the built-in mouse interface.

Syntax

<void> FrameBase.setMoveable(<Boolean> value, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
value

The new property value.

callback

Optional. Is called when the operation completed.

errorCallback

Optional. Is called when the operation failed with an error.

Examples

The following example demonstrates FrameBase.setMoveable in a practical document-editing workflow. It sets whether a frame can be moved in the document at run time with the built-in mouse interface.

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

function configureMoveable(frameBase) {
    frameBase.setMoveable(
        true,
        function() {
            console.log("set moveable completed.");
        },
        onTxError
    );
}