Skip to main content
A newer version of this page is available. .
cut

RichEditCommands.changeTextBoxContentMargins Property

Gets a command to modify a text box’s content margins.

Declaration

changeTextBoxContentMargins: ChangeTextBoxContentMarginsCommand

Property Value

Type Description
ChangeTextBoxContentMarginsCommand

A ChangeTextBoxContentMarginsCommand object that provides methods for executing the command and checking its state.

Remarks

You can invoke this command by calling the execute method.

The execute method checks the command state (obtained using the getState method) before executing, and decides whether the action can be performed. The execute and getState methods are members of the ChangeTextBoxContentMarginsCommand class.

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.changeTextBoxContentMargins.execute(settings);
See Also