TX Text Control .NET Server

Javascript: FrameBase.getSize Method

Method|Introduced in 28.0

Description

Gets the frame's size in twips.

Syntax

<void> FrameBase.getSize(<RequestSizeCallback> callback, [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
callback

Receives the current property value.

errorCallback

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

Examples

The following example demonstrates FrameBase.getSize in a practical document-editing workflow. It gets the frame's size in twips.

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

function inspectSize(frameBase) {
    frameBase.getSize(
        function(size) {
            if (!size) {
                console.warn("No size was returned.");
                return;
            }
            
            console.log("get size result:", size);
        },
        onTxError
    );
}