Skip to main content

ChangeTextBoxContentMarginsCommand.execute(settings) Method

Executes the ChangeTextBoxContentMarginsCommand command with the specified parameter.

Declaration

execute(
    settings: Margins
): boolean

Parameters

Name Type Description
settings Margins

A Margins object specifying margin 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 text box object):

var settings = {
    left: rich.unitConverter.pixelsToTwips(20),
    right: rich.unitConverter.pixelsToTwips(20),
    top: rich.unitConverter.pixelsToTwips(20),
    bottom: rich.unitConverter.pixelsToTwips(20)
};
rich.commands.changeTextBoxContentMarginsCommand.execute(settings);
See Also