Class UserPlaceableTextMM
Represents a text object that can be placed and aligned on a page in millimeters, whereby the properties can be set directly using code or they can be taken from another source as an input mask or a configuration dataset. For instance, by providing an input mask or configuration dataset, program users can customize the positioning of the text objects within the page's header themselves. For more information, see the example Alignment of Header Objects.
public class UserPlaceableTextMM : UserPlaceableText
- Inheritance
-
UserPlaceableTextMM
- Inherited Members
Examples
public class ExampleReport : HeaderFooterReport {
public ExampleReport() {
Title = new UserPlaceableTextMM("Example Report", TextFont, 0, AlignHor.Left, -15, AlignVert.Top);
}
Constructors
UserPlaceableTextMM(FontProp, double, AlignHor, double, AlignVert, double)
Initializes a new instance of the UserPlaceableTextMM class with specified font, positioning and alignment in millimeters. As the text is not set, this element is not displayed as long as the Text property is not set.
public UserPlaceableTextMM(FontProp font, double xMM, AlignHor alignHor, double yMM, AlignVert alignVert, double widthMM = 1.7976931348623157E+308)
Parameters
font
FontPropThe font for the text.
xMM
doubleThe horizontal position of the text in millimeters.
alignHor
AlignHorThe horizontal alignment of the text.
yMM
doubleThe vertical position of the text in millimeters.
alignVert
AlignVertThe vertical alignment of the text.
widthMM
doubleThe width of the text area in millimeters. Defaults to MaxValue, indicating no width constraint.
Remarks
The default of property TextOptions is set to AdjustWidth and SmallerFontIfToolLong.
Exceptions
- ArgumentNullException
The font parameter is null.
UserPlaceableTextMM(string, FontProp, double, AlignHor, double, AlignVert, double)
Initializes a new instance of the UserPlaceableTextMM class with specified text, font, positioning and alignment in millimeters.
public UserPlaceableTextMM(string text, FontProp font, double xMM, AlignHor alignHor, double yMM, AlignVert alignVert, double widthMM = 1.7976931348623157E+308)
Parameters
text
stringThe text content. The formatting options of the text are explained in class RepText, e.g.
This is an <i>italic title</i>
.font
FontPropThe font for the text.
xMM
doubleThe horizontal position of the text in millimeters.
alignHor
AlignHorThe horizontal alignment of the text.
yMM
doubleThe vertical position of the text in millimeters.
alignVert
AlignVertThe vertical alignment of the text.
widthMM
doubleThe width of the text area in millimeters. Defaults to MaxValue, indicating no width constraint.
Remarks
The default of property TextOptions is set to AdjustWidth and SmallerFontIfToolLong.
Exceptions
- ArgumentNullException
The text or font parameters are null.