Text class
| VI Server Class Information | |
|---|---|
| Return to VI Server Class Hierarchy | |
| Class Name | class |
| Class ID | {{{1}}} |
| Scope | |
| Class Inheritance |
This class is a top-level class. |
| Class Children | This class has no children. |
| |
This article is a stub. You can help LabVIEW Wiki by expanding it. Please improve this article if you can. |
The Text class is a class in the VI Server Class Hierarchy, (see also VI Server).
Properties
Show/Hide Text Properties Table
| Legend | |
|---|---|
| R/W | Readable/Writable Permissions |
| RTE | Available in the Run-Time Engine |
| Basic Development Environment | |
| VI Scripting | |
| Private | |
| Deprecated | |
| Property ID | Short Name (English) | Description | R/W | RTE |
|---|---|---|---|---|
| 632D819 | AttachedObj | Gets or sets the reference to a block diagram object to which a text label is attached. This property only works with free labels on the block diagram. | R/W | X |
| 632D812 | DocBounds | Returns the size required to display the entire text. | R | X |
| 632D814 | DocHeight | Returns the height required to display the entire text. | R | X |
| 632D813 | DocWidth | Returns the width required to display the entire text. | R | X |
| 632D81A | EnableHyperlinks | R/W | X | |
| 632D801 | Font | Cluster of font name, size, bold, italic, underline, strikeout.
This property is similar to the Font option in the Font Style dialog box. |
R/W | X |
| 632D809 | FontBold | Indicates whether the text is bold.
This property is an element of the Font property. |
R/W | X |
| 632D80D | FontColor | Sets the color of the currently selected text. You can use the Selection property to select a subset of a string.
You can set the color of the front panel object by wiring a hexadecimal number with the form RRGGBB or by wiring the color box constant to the property. This property is an element of the Font property. |
R/W | X |
| 632D80A | FontItalic | Indicates whether the text is italic.
This property is an element of the Font property. |
R/W | X |
| 632D807 | FontName | Font name. Predefined font names include App Font, Sys Font, and Dlg Font. If you provide an empty string, this property returns an error.
This property is an element of the Font property. |
R/W | X |
| 632D808 | FontSize | Font size.
This property is an element of the Font property. |
R/W | X |
| 632D80C | FontStrike | Indicates whether the text is in the strikeout font.
This property is an element of the Font property. |
R/W | X |
| 632D80B | FontUnder | Indicates whether the text is underlined.
This property is an element of the Font property. |
R/W | X |
| 632D818 | FontType | W | X | |
| 632D811 | InterpAsUnicode | R/W | X | |
| 632D815 | Justify | Gets and sets the justification of text.
Values include Left Center Right This property is similar to the Align option in the Font Style dialog box. |
R/W | X |
| 632D817 | Lock | Locks the label or caption to the owning control, indicator, or terminal. You cannot set this property on text fields that are not labels or captions, such as Boolean text, numeric text, free labels, and so on.
This property is similar to the Lock Label option in the shortcut menu. Note You cannot lock labels to wires. You can use the Position:Left and Position:Top properties to move a label programmatically. You also can use the Move to Default Location method to return the label to its default position programmatically. |
R/W | X |
| 632D805 | ScrollPos | Position of the scroll box in the scroll bar.
To set the position, wire a numeric value to this property that represents the line number to which you want to scroll. LabVIEW pins the numeric value that you wire to the property to the last line of the scroll box. If you want to scroll to the last line of text, wire the maximum numeric value for the line number to the property. If you wire a negative numeric value or a numeric valuer larger than the scroll bar maximum to this property, the scroll box scrolls to the last line of text. The position is 0-indexed. For example, if a string control contains 6 lines of text, you can wire a value of 2 to this property to move the scroll box to the position of the third line. |
R/W | X |
| 632D802 | Selection | Text selection specified in terms of character positions for the beginning of selection (inclusive) and end of selection (not inclusive). If you set the start and end to be the same, LabVIEW inserts a caret into the text.
If you want to highlight the text, you must set key focus on a control before you use the Selection property. |
R/W | X |
| 632D804 | SelEnd | Allows you to select the end point of text in a text string.
Use this property in conjunction with the Text Properties to programmatically change a property of a subset of a string. This property is an element of the Selection property. |
R/W | X |
| 632D803 | SelStart | Character position for the beginning of selection (inclusive).
Use this property in conjunction with the Text Properties to programmatically change a property of a subset of a string. This property is an element of the Selection property. |
R/W | X |
| 632D806 | SizeToText? | Sets whether the size of the text object changes according to the text included. You can write this property only for free labels, control labels, and captions. | R/W | X |
| 632D800 | Text | Text as displayed in the front panel object. For example, if you set a string control to use Password Display, this property returns the password string, such as ****, not the Normal Display of the string.
If the text string is a free label or a caption, you can write this property when the VI is running, and it is available in the Run-Time Engine. If the text string is an owned label, you cannot write this property when the VI is running, and it is available in the Run-Time Engine only for reading. If the text string is a unit label, you can write this property when the VI is running, and it is available in the Run-Time Engine. However, the unit you write must be compatible with the existing unit. If the units are not compatible, LabVIEW returns an error and sets the unit label to the base unit. If you read or write this property for a nonexistent caption in a VI that is not running, LabVIEW creates the caption. If the VI is running, LabVIEW returns an error. If you want to determine whether a front panel object has a caption, use the Has Caption property instead of comparing the value of the Text property to an empty string. When you read the Text property of a nonexistent caption, LabVIEW creates a caption and copies the label into the caption. Therefore, the Text property does not accurately reflect whether the caption contained text before the Text property was called. |
R/W | X |
| 632D80E | TextColors | Changes the foreground and background color of a text string.
You can set the color of the front panel object by wiring a hexadecimal number with the form RRGGBB or by wiring the color box constant to the property.
|
R/W | X |
| 632D810 | BGColor | Background color of text object.
You can set the color of the front panel object by wiring a hexadecimal number with the form RRGGBB or by wiring the color box constant to the property. This property is an element of the Text Colors property. |
R/W | X |
| 632D80F | TextColor | Text color for all fonts in the text.
You can set the color of the front panel object by wiring a hexadecimal number with the form RRGGBB or by wiring the color box constant to the property. This property is an element of the Text Colors property. |
R/W | X |
| 632D81B | Txt Overflow | R/W | X | |
| 632D816 | Vertical Arrangement | Gets and sets the vertical arrangement for the text. You can set the vertical arrangement for labels, captions, and free labels. | R/W | X |
Methods
Show/Hide Text Methods Table
| Legend | |
|---|---|
| RTE | Available in the Run-Time Engine |
| Basic Development Environment | |
| VI Scripting | |
| Private | |
| Deprecated | |
| Method ID | Short Name (English) | Description | RTE |
|---|---|---|---|
| 632D400 | MoveToDefLoc | Move a label to its default location relative to its owner.
If you use the Move to Default Location method after you use the Lock property programmatically, the label does not remain locked to the position you select, but returns to the default location. The label then is locked to the default position until you unlock the label. |
X |
Events
No Events for this class.
History
| |
History information is needed. What changes have occured over previous versions? |
| Version | Change(s) |
|---|---|
| More info to come. |