The requested page is not available for the requested platform. You are viewing the content for Default platform.
cut

RichEditCommands.changeTextBoxContentMargins Property

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

Declaration

readonly 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