|
|
| Line 7: |
Line 7: |
| {{TOCright}} | | {{TOCright}} |
|
| |
|
| ==Properties==
| | <!--Edit Properties, Methods, or Events in the appropriate table in one on the VI Server Templates--> |
| <span class="mw-customtoggle-propertiestable">Show/Hide String Properties Table</span> | | {{VIServerClassTables|27}} |
| <div class="mw-collapsible" id="mw-customcollapsible-propertiestable">
| |
| {{VIServerLegend|showrw=TRUE|showrte=TRUE}}
| |
| {| class="wikitable sortable"
| |
| |+ String Properties Table
| |
| ! Property ID | |
| ! Short Name (English)
| |
| ! Description
| |
| ! R/W
| |
| ! RTE
| |
| |- style="background-color:#FFFFCC;"
| |
| |6345813
| |
| | [[String class/Allow Dragging property|Allow Dragging]]
| |
| |If TRUE, LabVIEW starts a drag and drop operation when you use the Operating tool to drag text from this control.
| |
| | |
| Use the Control events for more control over how users drag items within controls.
| |
| |R/W
| |
| |X
| |
| |- style="background-color:#FFFFCC;"
| |
| |6345814
| |
| | [[String class/Allow Dropping property|Allow Dropping]]
| |
| |If TRUE, the control automatically accepts text dragged to it, including the LV_TEXT data type from drag and drop events. The LV_TEXT data type is of type string. If FALSE, LabVIEW does not automatically accept any drops, including from the operating system, at run time. LabVIEW returns error 1157 if you set this property on an indicator.
| |
| | |
| Use the Control events for more control over how users drag items within controls.
| |
| |R/W
| |
| |X
| |
| |- style="background-color:#CCFFFF;"
| |
| |6345809
| |
| | [[String class/DefVal property|DefVal]]
| |
| |Gets or sets the default value of the string control.
| |
| |R/W
| |
| |X
| |
| |- style="background-color:#FFFFCC;"
| |
| |6345815
| |
| | [[String class/DisplayFormatVisibility property|DisplayFormatVisibility]]
| |
| |Gets or sets the visibility of the display format for the string control.
| |
| | |
| This property is similar to the <b>Visible Items»Display Style</b> item on the shortcut menu of a string object and the<b> Display Style Visible</b> checkbox on the Appearance page of the<b> String Properties</b> dialog box.
| |
| |R/W
| |
| |X
| |
| |- style="background-color:#FFFFCC;"
| |
| |6345805
| |
| | [[String class/DispStyle property|DispStyle]]
| |
| |Sets the display style of a string object. Valid values include 0 (normal), 1 (backslash '\' codes), 2 (password), and 3 (hex). You cannot write to this property when the referenced string control has key focus.
| |
| | |
| This property is similar to the Display items on the shortcut menu of a string object.
| |
| |R/W
| |
| |X
| |
| |- style="background-color:#FFFFCC;"
| |
| |6345812
| |
| | [[String class/EnableWrap property|EnableWrap]]
| |
| |If FALSE, disables word wrapping, wrapping only at line breaks instead.
| |
| | |
| To use this property, you must set the display style to 0 (normal). This property is similar to the Enable Wrapping item on the shortcut menu of a string control and the <b>Wrap at word breaks</b> option on the Appearance page of the <b>String Properties</b> dialog box.
| |
| |R/W
| |
| |X
| |
| |- style="background-color:#D1BB80;"
| |
| |634580A
| |
| | [[String class/Force Unicode Text property|Force Unicode Text]]
| |
| |
| |
| |R/W
| |
| |X
| |
| |- style="background-color:#FFFFCC;"
| |
| |6345811
| |
| | [[String class/HScrollVis property|HScrollVis]]
| |
| |If TRUE, displays a horizontal scroll bar.
| |
| | |
| Before you display a horizontal scroll bar, you must set Enable Wrapping to FALSE and set the display style to 0 (normal).
| |
| | |
| This property is similar to the <b>Visible Items»</b>Horizontal Scrollbar item on the shortcut menu of a string control and the <b>Show horizontal scroll bar</b> option on the Appearance page of the <b>String Properties</b> dialog box.
| |
| |R/W
| |
| |X
| |
| |- style="background-color:#FFFFCC;"
| |
| |6345807
| |
| | [[String class/LimitSglLine property|LimitSglLine]]
| |
| |If TRUE, the user cannot enter a carriage return in the control or indicator. However, the user can copy the first line of a string and paste it in the string control or indicator.
| |
| | |
| This property is similar to the Limit to Single Line item on the shortcut menu of a string object.
| |
| |R/W
| |
| |X
| |
| |- style="background-color:#D1BB80;"
| |
| |634580B
| |
| | [[String class/PreallocLen property|PreallocLen]]
| |
| |
| |
| |R/W
| |
| |X
| |
| |- style="background-color:#FFFFCC;"
| |
| |634580D
| |
| | [[String class/Size property|Size]]
| |
| |Width and height in pixels of the frame around the text area of the string control.
| |
| | |
| This property is similar to the <b>Size Height</b> and <b>Size Width</b> options on the Appearance page of the <b>Properties</b> dialog box.
| |
| |R/W
| |
| |X
| |
| |- style="background-color:#FFFFCC;"
| |
| |634580F
| |
| | [[String class/Height property|Height]]
| |
| |Height of the frame around the text area of the string control in pixels.
| |
| | |
| This property is an element of the Size property. This property is similar to the <b>Size Height</b> option on the Appearance page of the <b>Properties</b> dialog box.
| |
| |R/W
| |
| |X
| |
| |- style="background-color:#FFFFCC;"
| |
| |634580E
| |
| | [[String class/Width property|Width]]
| |
| |Width of the frame around the text area of the string control in pixels.
| |
| | |
| This property is an element of the Size property. This property is similar to the <b>Size Width</b> option on the Appearance page of the <b>Properties</b> dialog box.
| |
| |R/W
| |
| |X
| |
| |- style="background-color:#FFFFCC;"
| |
| |6345804
| |
| | [[String class/Text property|Text]]
| |
| |Reference to the text inside the string control.
| |
| |R
| |
| |X
| |
| |- style="background-color:#FFFFCC;"
| |
| |6345808
| |
| | [[String class/UpdtWhileTyping property|UpdtWhileTyping]]
| |
| |Updates the value of a string as the user enters characters instead of waiting until the user presses the key or otherwise ends text entry.
| |
| | |
| This property is similar to the Update Value while Typing item on the shortcut menu of a string object.
| |
| |R/W
| |
| |X
| |
| |- style="background-color:#FFFFCC;"
| |
| |6345800
| |
| | [[String class/Value property|Value]]
| |
| |Value of string control.
| |
| |R/W
| |
| |X
| |
| |- style="background-color:#FFFFCC;"
| |
| |634580C
| |
| | [[String class/Val(Sgnl) property|Val(Sgnl)]]
| |
| |Sets the value of the control and generates a Value Change event.
| |
| | |
| This property updates the value of an object similar to the Value property. However, Value (Signaling) also causes LabVIEW to generate an event as if the user had interactively changed the value of the object. National Instruments recommends you use this property only when you rely on LabVIEW generating an event in response to the programmatic value change.
| |
| |W
| |
| |X
| |
| |- style="background-color:#FFFFCC;"
| |
| |6345810
| |
| | [[String class/VScrollVis property|VScrollVis]]
| |
| |If TRUE, displays a vertical scroll bar.
| |
| | |
| This property is similar to the <b>Visible Items»</b>Vertical Scrollbar item on the shortcut menu of a string control and the <b>Show vertical scroll bar</b> option on the Appearance page of the <b>String Properties</b> dialog box.
| |
| |R/W
| |
| |X
| |
| |}
| |
| </div>
| |
| | |
| ==Methods==
| |
| <span class="mw-customtoggle-methodstable">Show/Hide String Methods Table</span>
| |
| <div class="mw-collapsible" id="mw-customcollapsible-methodstable">
| |
| {{VIServerLegend|showrte=TRUE}} | |
| {| class="wikitable sortable"
| |
| |+ String Methods Table
| |
| ! Method ID
| |
| ! Short Name (English)
| |
| ! Description
| |
| ! RTE
| |
| |- style="background-color:#FFFFCC;"
| |
| |6345403
| |
| | [[String class/Append String method|Append String]]
| |
| |Appends a string to the existing value of the referenced string control.
| |
| |X
| |
| |- style="background-color:#FFFFCC;"
| |
| |6345402
| |
| | [[String class/ByteOffFromPt method|ByteOffFromPt]]
| |
| |Returns the byte offset of the string from the given point.
| |
| |X
| |
| |- style="background-color:#FFFFCC;"
| |
| |6345401
| |
| | [[String class/Get Nth Line method|Get Nth Line]]
| |
| |Gets the characters that make up the Nth line in a string control and returns the offsets in the original string in bytes.
| |
| | |
| You can use this method to determine how the text in a string control is word-wrapped. The position indexes are byte indexes. These are usually equivalent to character indexes, except when using text that has characters that use multiple bytes, such as Asian character sets.
| |
| | |
| Example
| |
| |X
| |
| |- style="background-color:#FFFFCC;"
| |
| |6345400
| |
| | [[String class/Size to Text method|Size to Text]]
| |
| |Resizes the string control vertically to show all text. This method does not resize the string control horizontally.
| |
| | |
| This method is similar to the <b>Size to text</b> option on the Appearance page of the <b>Properties</b> dialog box.
| |
| |X
| |
| |}
| |
| </div>
| |
| | |
| ==Events==
| |
| ''No Events for this class.''
| |
|
| |
|
| == History == | | == History == |
The String class is a class in the VI Server Class Hierarchy, (see also VI Server).
Properties
Show/Hide String Properties Table
String Properties Table
| Property ID
|
Long Name (English)
|
Description
|
R/W
|
RTE
|
| 6345800 | Value | Value of string control. | Read/Write | Yes |
| 6345801 | Text Size | | Read/Write | Yes |
| 6345802 | Text Size:Width | Width of the frame around the text area of the string control in pixels. | Read/Write | Yes |
| 6345803 | Text Size:Height | Height of the frame around the text area of the string control in pixels. | Read/Write | Yes |
| 6345804 | Text | Reference to the text inside the string control. | Read Only | Yes |
| 6345805 | Display Style | Sets the display style of a string object. Valid values include 0 (normal), 1 (backslash '\' codes), 2 (password), and 3 (hex). You cannot write to this property when the referenced string control has key focus. | Read/Write | Yes |
| 6345806 | Scrollbar Visible | | Read/Write | Yes |
| 6345807 | Limit To Single Line? | If TRUE, the user cannot enter a carriage return in the control or indicator. However, the user can copy the first line of a string and paste it in the string control or indicator. | Read/Write | Yes |
| 6345808 | Update While Typing? | Updates the value of a string as the user enters characters instead of waiting until the user presses the <Enter> key or otherwise ends text entry. | Read/Write | Yes |
| 6345809 | Default Value | Gets or sets the default value of the string control. | Read/Write | Yes (Read Only) |
| 634580A | Force Unicode Text | | Read/Write | Yes |
| 634580B | Prealloc Length | | Read/Write | Yes |
| 634580C | Value (Signaling) | Sets the value of the control and generates a Value Change event. | Write Only | Yes |
| 634580D | Size | Width and height in pixels of the frame around the text area of the string control. | Read/Write | Yes |
| 634580E | Size:Width | Width of the frame around the text area of the string control in pixels. | Read/Write | Yes |
| 634580F | Size:Height | Height of the frame around the text area of the string control in pixels. | Read/Write | Yes |
| 6345810 | Vertical Scrollbar Visible | If TRUE, displays a vertical scroll bar. | Read/Write | Yes |
| 6345811 | Horizontal Scrollbar Visible | If TRUE, displays a horizontal scroll bar. | Read/Write | Yes |
| 6345812 | Enable Wrapping | If FALSE, disables word wrapping, wrapping only at line breaks instead. | Read/Write | Yes |
| 6345813 | Allow Dragging | If TRUE, LabVIEW starts a drag and drop operation when you use the Operating tool to drag text from this control. | Read/Write | Yes |
| 6345814 | Allow Dropping | If TRUE, the control automatically accepts text dragged to it, including the LV_TEXT data type from drag and drop events. The LV_TEXT data type is of type string. If FALSE, LabVIEW does not automatically accept any drops, including from the operating system, at run time. LabVIEW returns error 1157 if you set this property on an indicator. | Read/Write | Yes |
| 6345815 | Display Format Visible? | Gets or sets the visibility of the display format for the string control. | Read/Write | Yes (Read Only) |
Methods
Show/Hide String Properties Table
String Methods Table
| Method ID
|
Long Name (English)
|
Description
|
RTE
|
| 6345400 | Size to Text | Resizes the string control vertically to show all text. This method does not resize the string control horizontally. | Yes (Read/Write) |
| 6345401 | Get Nth Line | Gets the characters that make up the Nth line in a string control and returns the offsets in the original string in bytes. | Yes (Read/Write) |
| 6345402 | Byte Offset from Point | Returns the byte offset of the string from the given point. | Yes (Read/Write) |
| 6345403 | Append String | Appends a string to the existing value of the referenced string control. | Yes (Read/Write) |
Events
This class has no events or it inherits events from its parent: Control Class.
History
| Version
|
Change(s)
|
|
More info to come.
|
See Also