Shape Layout Dialog
- 3 minutes to read
In the Layout dialog invoked for the selected shape, users can specify the position, text wrapping style, and distance, scale and rotation of the drawing object (Shape).
Users can invoke the Layout dialog by right-clicking a shape or inline picture and selecting the More layout Options… command in the context menu. Executing the ShowFloatingObjectLayoutOptionsFormCommand command invokes this dialog as well.
The settings are combined in the following tabs:
Position
Options in the Position tab enable users to specify the relative position of the floating object via the Alignment option, or the absolute position by specifying the distance in actual units of measurement. The absolute position means that the horizontal or vertical position of the shape is measured from the anchoring paragraph, the column that contains the anchoring paragraph, the margin, or the edge of the page.
The following API allows you to specify Position options in code:
Option | Description | API Member |
---|---|---|
Horizontal alignment | Specifies the horizontal alignment | Shape.HorizontalAlignment |
(Horizontal alignment) relative to | Specifies the element to which the shape’s horizontal position is relative. | Shape.RelativeHorizontalPosition |
(Horizontal alignment) absolute position | Specifies the absolute horizontal position of a shape. | Shape.OffsetX |
(Horizontal alignment absolute position) to the right of | Defines the element relative to which the shape is positioned horizontally. | Shape.RelativeHorizontalPosition |
Vertical alignment | Specifies the vertical alignment. | Shape.VerticalAlignment |
(Vertical alignment) relative to | Specifies the element to which the shape’s vertical position is relative. | Shape.RelativeVerticalPosition |
(Vertical alignment) absolute position | Specifies the absolute vertical position of a shape. | Shape.OffsetY |
(Vertical alignment absolute position) to the right of | Defines the element relative to which the shape is positioned vertically. | Shape.RelativeVerticalPosition |
Lock anchor | Locks the shape anchor. | Shape.LockAnchor |
Text Wrapping
Text Wrapping allows users to define how text wraps around a shape and specifies the distance from text where applicable.
The following API allows you to specify Position options in code:
Option | Description | API Member |
---|---|---|
Wrapping style | Specifies the text wrapping style. | Shape.TextWrapping |
Wrap text | Specifies which sides to wrap text around. | Shape.TextWrappingSide |
Distance from text | Defines the distance between the shape and surrounding text. | Shape.MarginTop Shape.MarginBottomShape.MarginLeft Shape.MarginRight |
Size
Options in the Size tab include the rotation degree editor, which enables an user to rotate an object to the specified degree, and a check box that allows the user to keep a shape’s aspect ratio during resize.
Before a dialog is shown, the RichEditControl.FloatingInlineObjectLayoutOptionsFormShowing event is raised.
Note
Set the Document.Unit property to specify units of measure to be used in the dialog.
Option | Description | API Member |
---|---|---|
Height | Specifies the shape’s height in measurement units defined by the Document.Unit property. | Shape.Height |
Width | Specifies the shape’s width in measurement units defined by the Document.Unit property. | Shape.Width |
Rotate | Rotates a shape | Shape.RotationAngle |
Lock aspect ratio | Allows you to resize a shape proportionally. | Shape.LockAspectRatio |