Platforms to show: All Mac Windows Linux Cross-Platform
Back to CDTextBoxMBS class.
CDTextBoxMBS.setAlignment(a as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Argument | Default | Description |
a | (Mandatory) | The alignment specification. See Alignment Specification for supported alignment types. |
CDTextBoxMBS.setFontAngle(angle as Double, vertical as boolean=false)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
See Font Specification for details on various font attributes.
Argument | Default | Description |
angle | (Mandatory) | The text rotation angle. Rotation is measured in counter-clockwise direction in degrees. |
vertical | false | Determine if the font is layout horizontally (from left to right) or vertically (from top to down). Vertical layout is common for Oriental languages such as Chinese, Japanese and Korean. A true value means vertical layout. A false value means horizontal layout. |
See font specification here:
http://www.monkeybreadsoftware.net/faq-chartdirectorfontspecification.shtml
Some examples using this method:
CDTextBoxMBS.setFontColor(colorvalue as color)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 11.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
See also:
Some examples using this method:
CDTextBoxMBS.setFontColor(colorvalue as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
If this method is not called, TextColor will be used to draw the text.
Argument | Default | Description |
color | (Mandatory) | The font color. |
See also:
CDTextBoxMBS.setFontSize(fontHeight as Double, fontWidth as Double = 0)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
See Font Specification for details on various font attributes.
Argument | Default | Description |
fontHeight | (Mandatory) | The font height in points. |
fontWidth | 0 | The font width in points. If the font width is zero, it is assumed to be the same as the font height. |
See font specification here:
http://www.monkeybreadsoftware.net/faq-chartdirectorfontspecification.shtml
CDTextBoxMBS.setFontStyle(font as string, fontIndex as Integer = 0)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
See Font Specification for details on various font attributes.
Argument | Default | Description |
font | (Mandatory) | The font name. |
fontIndex | 0 | The font index in case the font name refers to a font collection. An index of 0 means the first font. |
See font specification here:
http://www.monkeybreadsoftware.net/faq-chartdirectorfontspecification.shtml
Some examples using this method:
CDTextBoxMBS.setHeight(height as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
By default, the height of the text box is automatically determined to be just enough to hold the text. The setHeight method can be used to specified a fix height.
Argument | Default | Description |
height | (Mandatory) | The height of the text box in pixels. |
CDTextBoxMBS.setMargin(leftMargin as Integer, rightMargin as Integer, topMargin as Integer, bottomMargin as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
The margins of a text box are the distances between the borders of the text box to the text inside. By default, the left and right margins are approximately half the font width, and the top and bottom margins are approximately 1/4 of the font height.
Argument | Default | Description |
leftMargin | (Mandatory) | The left margin in pixels. |
rightMargin | (Mandatory) | The right margin in pixels. |
topMargin | (Mandatory) | The top margin in pixels. |
bottomMargin | (Mandatory) | The bottom margin in pixels. |
See also:
CDTextBoxMBS.setMargin(m as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
The margins of a text box are the distances between the borders of the text box to the text inside. By default, the left and right margins are approximately half the font width, and the top and bottom margins are approximately 1/4 of the font height.
Argument | Default | Description |
m | (Mandatory) | The left, right, top and bottom margins in pixels. |
See also:
CDTextBoxMBS.setMaxWidth(width as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
By default, the width of the text box is automatically determined to be the length of the text. This method can be used to limit the width of the text box. If the text requires a longer width for display, it will be wrapped into multiple lines.
Argument | Default | Description |
maxWidth | (Mandatory) | The maximum width of the text box in pixels. |
CDTextBoxMBS.setText(text as string)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
See ChartDirector Mark Up Language on how to embed special tags in the text for sophisticated formatting.
Argument | Default | Description |
text | (Mandatory) | The text to be displayed in the text box. |
CDTextBoxMBS.setTruncate(maxWidth as Integer, maxLines as Integer = 1)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
The maxWidth parameter of this method specifies the maximum width of the text box. If the text requires a longer width for display, it will be wrapped into multiple lines. However, if the number of lines exceed maxLines, the text will be truncated, with the last visible characters replaced with "...".
If maxLines is 1 (the default), the text will never be wrapped and will be truncated directly if it needs more than maxWidth for display.
Argument | Default | Description |
maxWidth | (Mandatory) | The maximum width of the text box in pixels. |
maxLines | 1 | The maximum number of lines that the text box can have. The text will be truncated if it exceeds the maximum number of lines. |
CDTextBoxMBS.setWidth(width as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
By default, the width of the text box is automatically determined to be the length of the text. The setWidth method can be used to specified a fix width. If the text requires a longer width for display, the text will be wrapped into multiple lines.
Argument | Default | Description |
width | (Mandatory) | The width of the text box in pixels. |
The items on this page are in the following plugins: MBS ChartDirector Plugin.