Skip to main content

ChangeTextBoxRelativeSizeCommand.execute(settings) Method

Executes the ChangeTextBoxRelativeSizeCommand command with the specified parameter.

Declaration

execute(
    settings: TextBoxRelativeSizeSettings
): boolean

Parameters

Name Type Description
settings TextBoxRelativeSizeSettings

A TextBoxRelativeSizeSettings object specifying relative size settings.

Returns

Type Description
boolean

true if the command has been successfully executed; false if the command execution has failed.

Remarks

The command includes size parameters assigned in twips. Use the ASPxClientRichEdit.unitConverter to convert size measure units (inches, points, pixels, centimeters) to twips.

Usage example (it is implied that selection is set to a floating object):

var settings = {
    relativeWidth: rich.unitConverter.pixelsToTwips(50),
    relativeWidthType: ASPx.FloatingObjectRelativeWidthType.Page,
    relativeHeight: rich.unitConverter.pixelsToTwips(25),
    relativeHeightType: ASPx.FloatingObjectRelativeHeightType.Page
};
rich.commands.changeTextBoxRelativeSize.execute(settings);
See Also