Jump to content

Control class: Difference between revisions

From LabVIEW Wiki
Started page
 
m Removed VI Sever Category from page
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{VIServerClass|name=Control|id=6|scope=basic|class_0=Generic|class_1=GObject|class_2=Control}}
{{VIServerClass|6}}


{{stub}}
{{stub}}
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 Control Properties Table</span>
{{VIServerClassTables|6}}
<div class="mw-collapsible" id="mw-customcollapsible-propertiestable">
{{VIServerLegend|showrw=TRUE|showrte=TRUE}}
{| class="wikitable sortable"
|+ Control Properties Table
! Property ID
! Short Name (English)
! Description
! R/W
! RTE
|- style="background-color:#CCFFFF;"
|633201C
| [[Control class/Auto-Update property|Auto-Update]]
|If TRUE, the control automatically updates when the type definition changes.
|R/W
|X
|- style="background-color:#D1BB80;"
|633201D
| [[Control class/BitAccurateDataSize property|BitAccurateDataSize]]
|
|R
|X
|- style="background-color:#FFFFCC;"
|6332003
| [[Control class/Blinking property|Blinking]]
|If TRUE, the control blinks.
 
Keep in mind the following caveats when using this property:
 
 
If you set this property to TRUE for system controls, the controls might not blink correctly. System controls are designed specifically for use in dialog boxes and are not designed to blink because standard dialog boxes usually do not contain blinking controls.
You cannot use this property with XControls or controls on a subpanel.
Do not use this property with elements in an array. This property works on only one element in the array, not the entire array. Use a cluster instead of an array to make all the elements blink.
 
This property is similar to the <b>Blink Foreground</b> and <b>Blink Background</b> options on the Environment page of the Options dialog box, and to the <b>Blink delay for front panel controls (milliseconds)</b> option on the Front Panel page of the <b>Options</b> dialog box.
|R/W
|X
|- style="background-color:#FFFFCC;"
|633203F
| [[Control class/BuiltInMouseWheelSupport property|BuiltInMouseWheelSupport]]
|Sets the conditions under which the control responds to mouse wheel movement.
 
For example, you can specify whether a control responds when you either hover over the control or the control has key focus. This property is similar to the <b>Built-In Mouse Wheel Support</b> option on the <b>Key Navigation</b> page of the Properties dialog box.
 
 
<b>Note</b>  You can use the key focus functionality only on Windows operating systems.
|R/W
|X
|- style="background-color:#D1BB80;"
|6332026
| [[Control class/C Type property|C Type]]
|
|R
|X
|- style="background-color:#FFFFCC;"
|6332004
| [[Control class/Caption property|Caption]]
|Reference to the caption object. You can use this reference with the Text properties.
 
<b>Note</b>  You first must create the caption before you use this property, or LabVIEW returns an error. LabVIEW creates the caption the first time you set the caption to visible.
This property is similar to the <b>Visible Items&#0187;Caption</b> option on the shortcut menu of front panel controls and the <b>Caption Visible</b> and <b>Caption Text</b> item on the <b>Appearance</b> page of the Properties dialog box.
|R
|X
|- style="background-color:#FFFFCC;"
|6332040
| [[Control class/ControlIndex property|ControlIndex]]
|Gets the index of the control or indicator you specify. If the control or indicator for which you want to get the index does not have a terminal on the block diagram, this property returns an error.
 
You can use this property to specify the controls for which you get or set values with the Get Control Values by Index or Set Control Values by Index functions.
 
 
(Real-Time Module) Use the Get Control Index by Name method instead of the Control Index property to get control indexes. You can use the Control Index property on LabVIEW Real-Time systems only while connected to the RT target from the LabVIEW project. As a result, this property can work in the development environment but does not work in RT built applications.
|R
|X
|- style="background-color:#CCFFFF;"
|6332009
| [[Control class/CtrlRefNodes() property|CtrlRefNodes()]]
|Returns references to the control reference nodes of this control.
|R
|
|- style="background-color:#FFFFCC;"
|633202D
| [[Control class/BindingType property|BindingType]]
|Returns the type of binding.
|R
|X
|- style="background-color:#D1BB80;"
|633202E
| [[Control class/BindingBlinkOnAlarm property|BindingBlinkOnAlarm]]
|
|R/W
|X
|- style="background-color:#FFFFCC;"
|633202B
| [[Control class/BindingLEDVisible property|BindingLEDVisible]]
|Shows or hides the data binding indicator.
|R/W
|X
|- style="background-color:#FFFFCC;"
|6332029
| [[Control class/BindingMode property|BindingMode]]
|Gets or sets the mode of the data connection.
|R/W
|X
|- style="background-color:#FFFFCC;"
|6332028
| [[Control class/BindingPath property|BindingPath]]
|Reads or writes the NI Publish-Subscribe Protocol (NI-PSP) URL to which the control is connected. To write this property, you must bind the control to the PSP URL before you begin writing.
 
<b>Note</b>  If the control is bound to a project item instead of a PSP URL and you attempt to write this property, this property returns an error.
To bind the control to a PSP URL, use the Bind to Network Path method while the VI is not running.
|R/W
|X
|- style="background-color:#D1BB80;"
|633202C
| [[Control class/BindingPersistID property|BindingPersistID]]
|
|R
|X
|- style="background-color:#FFFFCC;"
|633202A
| [[Control class/BindingStatus property|BindingStatus]]
|Returns the status of the data connection. The connection status can be Invalid Status, Unconnected, Active, Idle, Error, or Connecting.
 
Elements
 
Name
Description
 
Code
The connection status. Valid values are Invalid Status, Unconnected, Active, Idle, Error, or Connecting.
 
Text
Displays a message describing the current status.
|R
|X
|- style="background-color:#FFFFCC;"
|6332017
| [[Control class/DtSktEnbld property|DtSktEnbld]]
|This is the enabled state of the opc, ftp, and http connection on Windows, and the dstp and file connection on all LabVIEW-supported platforms. A connection can transfer data only when enabled.
|R/W
|X
|- style="background-color:#FFFFCC;"
|633201E
| [[Control class/DtSktLEDVisible property|DtSktLEDVisible]]
|Shows or hides the connection status indicator.
|R/W
|X
|- style="background-color:#FFFFCC;"
|6332016
| [[Control class/DtSktMode property|DtSktMode]]
|Gets or sets the mode of the data connection.
|R/W
|X
|- style="background-color:#FFFFCC;"
|6332018
| [[Control class/DtSktStatus property|DtSktStatus]]
|Returns the status of the data connection. The connection status can be Invalid Status, Unconnected, Active, Idle, Error, or Connecting.
 
Elements
 
Name
Description
 
Code
The connection status. Valid values are Invalid Status, Unconnected, Active, Idle, Error, or Connecting.
 
Text
Displays a message describing the current status.
|R
|X
|- style="background-color:#FFFFCC;"
|6332015
| [[Control class/DtSktURL property|DtSktURL]]
|Gets or sets the URL to which the control is connected. Valid URLs for using the DataSocket properties to connect controls are the opc, ftp, and http protocols on Windows, and the dstp and file protocols on all LabVIEW-supported platforms.
 
To set the URL, use the Attach DataSocket and Remove DataSocket methods when the VI is not running. Use front panel data bindings to bind controls to shared variables or to NI Publish-Subscribe Protocol (NI-PSP) data items.
|R/W
|X
|- style="background-color:#CCFFFF;"
|633200E
| [[Control class/DefVal property|DefVal]]
|Default value of the control (LabVIEW variant).
|R/W
|X
|- style="background-color:#CCFFFF;"
|6332043
| [[Control class/DefVal (Undo) property|DefVal (Undo)]]
|
|W
|
|- style="background-color:#FFFFCC;"
|633200F
| [[Control class/Desc property|Desc]]
|Description of the front panel object that appears in the Context Help window when you move the cursor over the object and in VI documentation you generate.
 
You can format the text in the description to appear bold in the Context Help window.
 
If you want to display a carriage return in the Context Help window, you must separate paragraphs with two carriage returns
 
This property is similar to the <b>VI description</b> text box on the Documentation page of the VI Properties dialog box.
|R/W
|X
|- style="background-color:#FFFFCC;"
|633203D
| [[Control class/Disabled property|Disabled]]
|Indicates whether you can operate the control.
 
This property is similar to <b>Advanced&#0187;Enabled State</b> item on the shortcut menu of a front panel control or indicator and to the <b>Enabled State</b> option on the <b>Appearance</b> page of the Properties dialog box.
|R/W
|X
|- style="background-color:#FFFFCC;"
|6332010
| [[Control class/FocusKeyBind property|FocusKeyBind]]
|Sets a shortcut key to navigate to this control.
 
This property is similar to the <b>Focus</b> option on the <b>Key Navigation</b> page of the Properties dialog box.
 
Elements
 
Name
Description
 
Control
If TRUE, the keyboard shortcut includes the  key.
 
Shift
 
If TRUE, the keyboard shortcut includes the  key.
 
Key
The name of the shortcut key. (Mac OS X) LabVIEW does not support , , and function keys  to  as shortcut keys on Mac OS X. Key must match one of the following values:
 
 
 
 
 
 
<b>Note</b>  The  key on the alphanumeric keyboard and  key on the numeric keypad are the same value.
 
 
 
F1
F2
F3
F4
F5
F6
F7
F8
F9
F10
F11
F12
F13
F14
F15
F16
F17
F18
F19
F20
F21
F22
F23
F24
 
<b>Note</b>  You must use the English Key name when wiring a shortcut key value.
|R/W
|X
|- style="background-color:#D1BB80;"
|633203C
| [[Control class/Genericity property|Genericity]]
|
|R/W
|X
|- style="background-color:#CCFFFF;"
|633202F
| [[Control class/GrowInfo property|GrowInfo]]
|Returns the growing abilities for this control.
|R
|X
|- style="background-color:#CCFFFF;"
|6332030
| [[Control class/GrowInfoGrowHoriz property|GrowInfoGrowHoriz]]
|Returns if this control can grow horizontally.
|R
|X
|- style="background-color:#CCFFFF;"
|6332031
| [[Control class/GrowInfoGrowVert property|GrowInfoGrowVert]]
|Returns if this control can grow vertically.
|R
|X
|- style="background-color:#CCFFFF;"
|6332034
| [[Control class/GrowInfoMaxHoriz property|GrowInfoMaxHoriz]]
|Returns the maximum size horizontally this control can grow.
|R
|X
|- style="background-color:#CCFFFF;"
|6332035
| [[Control class/GrowInfoMaxVert property|GrowInfoMaxVert]]
|Returns the maximum size vertically this control can grow.
|R
|X
|- style="background-color:#CCFFFF;"
|6332032
| [[Control class/GrowInfoMinHoriz property|GrowInfoMinHoriz]]
|Returns the minimum size horizontally this control can grow.
|R
|X
|- style="background-color:#CCFFFF;"
|6332033
| [[Control class/GrowInfoMinVert property|GrowInfoMinVert]]
|Returns the minimum size vertically this control can grow.
|R
|X
|- style="background-color:#CCFFFF;"
|6332022
| [[Control class/HasCaption property|HasCaption]]
|Returns TRUE if the control has a caption.
 
A control has a caption after you complete one of the following actions:
 
 
Display the caption by right-clicking the control and selecting <b>Visible&#0187;Caption</b> from the shortcut menu.
Programmatically get or set the caption text by using the Text property of the control.
 
<b>Note</b>  LabVIEW continues to store the caption for the control even if you hide the caption or use the text editor tool to delete the text of the caption. This behavior enables LabVIEW to display the caption if you choose to make it visible again. Therefore, this property continues to return TRUE for hidden captions.
|R
|X
|- style="background-color:#FFFFCC;"
|6332007
| [[Control class/Indicator property|Indicator]]
|If TRUE, the front panel object is an indicator. If FALSE, the object is a control.
|R/W
|X
|- style="background-color:#CCFFFF;"
|633200C
| [[Control class/InvokeNodes() property|InvokeNodes()]]
|Returns references to the invoke nodes of this control.
|R
|
|- style="background-color:#CCFFFF;"
|6332020
| [[Control class/IsOnConPane property|IsOnConPane]]
|Returns whether a control or indicator is on the connector pane of a VI.
|R
|X
|- style="background-color:#D1BB80;"
|633203B
| [[Control class/Is Stub? property|Is Stub?]]
|
|R
|X
|- style="background-color:#CCFFFF;"
|633201A
| [[Control class/Typedef? property|Typedef?]]
|Returns whether the control is linked to the type definition.
|R
|X
|- style="background-color:#FFFFCC;"
|6332002
| [[Control class/KeyFocus property|KeyFocus]]
|If TRUE, the control has key focus and receives the keys pressed on the keyboard.
|R/W
|X
|- style="background-color:#FFFFCC;"
|6332005
| [[Control class/Label property|Label]]
|Reference to the label object.
 
You can use this reference with the Text properties.
|R
|X
|- style="background-color:#D1BB80;"
|633201F
| [[Control class/LatchValue property|LatchValue]]
|
|R/W
|X
|- style="background-color:#CCFFFF;"
|633200A
| [[Control class/LocalVars() property|LocalVars()]]
|Returns references to the local variables of this control.
|R
|
|- style="background-color:#FFFFCC;"
|633203E
| [[Control class/OwningPane property|OwningPane]]
|Returns a reference to the pane that owns the referenced control.
 
For nested controls, this property returns a reference to the pane that owns the object that contains the control. For example, if you use this property on a control within a tab control, the property returns a reference to the pane that owns the tab control.
 
If the referenced control is not on a pane, this property returns Not a Refnum.
|R
|X
|- style="background-color:#CCFFFF;"
|633200B
| [[Control class/PropNodes() property|PropNodes()]]
|Returns references to the property nodes of this control.
|R
|
|- style="background-color:#FFFFCC;"
|6332021
| [[Control class/SkipTabbing property|SkipTabbing]]
|If TRUE, LabVIEW skips this control when you tab through the front panel.
 
This property is similar to the <b>Skip this control when tabbing</b> option on the <b>Key Navigation</b> page of the Properties dialog box.
|R/W
|X
|- style="background-color:#CCFFFF;"
|633203A
| [[Control class/Style ID property|Style ID]]
|Returns the style of the control.
|R
|X
|- style="background-color:#FFFFCC;"
|6332008
| [[Control class/SyncDisp property|SyncDisp]]
|When TRUE, enables synchronous display that shows every update to a data value in a control or indicator. When FALSE, asynchronous display permits the execution system to reduce updates to a slower rate and spend more time executing VIs.
 
In multithreaded systems, you can use this property to set whether to defer updates for controls and indicators. With asynchronous displays, after the execution system passes data to front panel controls and indicators, it can immediately continue execution.
 
This property is similar to the <b>Advanced&#0187;Synchronous Display</b> option on the shortcut menu of controls and indicators.
 
You also can use the Defer Panel Updates property to defer all new requests for front panel updates.
|R/W
|X
|- style="background-color:#CCFFFF;"
|6332006
| [[Control class/Terminal property|Terminal]]
|Returns the reference to the block diagram terminal of this control. Use this property to navigate between the front panel and the block diagram of a VI.
|R
|
|- style="background-color:#FFFFCC;"
|6332014
| [[Control class/TipStrip property|TipStrip]]
|Sets or returns the tip strip of a control. A tip strip is the brief description of the object that appears when you move the cursor over the object.
 
Other products refer to tip strips as tooltips.
|R/W
|X
|- style="background-color:#CCFFFF;"
|633201B
| [[Control class/TypedefPath property|TypedefPath]]
|Returns the path to the type definition if the control is linked to a type definition. Otherwise, LabVIEW returns an empty path.
|R
|X
|- style="background-color:#CCFFFF;"
|6332025
| [[Control class/TypedefVI property|TypedefVI]]
|Returns a reference to the type definition if the control is connected to a type definition. Otherwise, LabVIEW returns .
|R
|
|- style="background-color:#FFFFCC;"
|633200D
| [[Control class/Value property|Value]]
|Data value of the control (LV variant). If this is a Boolean value configured with a latching mechanical action, this property always returns an error. Due to race conditions that can occur when you have a Boolean value with latching mechanical action, you cannot programmatically read Boolean values that are set with a latching mechanical action.
|R/W
|X
|- style="background-color:#FFFFCC;"
|6332023
| [[Control 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.
 
If this is a Boolean value configured with a latching mechanical action, this property always returns an error. Due to race conditions that can occur when you have a Boolean value with latching mechanical action, you cannot programmatically read Boolean values that are set with a latching mechanical action.
|W
|X
|- style="background-color:#CCFFFF;"
|6332041
| [[Control class/Value (Undo) property|Value (Undo)]]
|
|W
|X
|- style="background-color:#FFFFCC;"
|6332000
| [[Control class/Visible property|Visible]]
|Displays the front panel control.
 
This property is similar to the Show Control and Hide Control options on the shortcut menu of a control.
|R/W
|X
|- style="background-color:#D1BB80;"
|6332019
| [[Control class/WizData property|WizData]]
|
|R/W
|X
|- style="background-color:#FFFFCC;"
|6332037
| [[Control class/Container Bounds property|Container Bounds]]
|Sets or gets the container bounds of the XControl.
|R/W
|X
|- style="background-color:#FFFFCC;"
|6332039
| [[Control class/Height property|Height]]
|Height of the XControl.
 
This property is an element of the XControl:Container Bounds property.
|R/W
|X
|- style="background-color:#FFFFCC;"
|6332038
| [[Control class/Width property|Width]]
|Width of the XControl.
 
This property is an element of the XControl:Container Bounds property.
|R/W
|X
|- style="background-color:#FFFFCC;"
|6332036
| [[Control class/Is XControl? property|Is XControl?]]
|Returns TRUE if the control is an XControl, FALSE otherwise.
|R
|X
|}
</div>
 
==Methods==
<span class="mw-customtoggle-methodstable">Show/Hide Control Methods Table</span>
<div class="mw-collapsible" id="mw-customcollapsible-methodstable">
{{VIServerLegend|showrte=TRUE}}
{| class="wikitable sortable"
|+ Control Methods Table
! Method ID
! Short Name (English)
! Description
! RTE
|- style="background-color:#FFFFCC;"
|6331C06
| [[Control class/AttachDataSocket method|AttachDataSocket]]
|National Instruments recommends using front panel data binding through the Shared Variable Engine or using the Bind To Network Path method to attach a data connection to a control.
 
This method allows you to attach an opc, ftp, and http connection to a control on Windows, and a dstp and file connection to a control on all LabVIEW-supported platforms. You can add new connections only at edit time.
 
This method is similar to the <b>Data Binding Selection</b>, <b>Path</b>, and <b>Access Type</b> options on the <b>Data Binding</b> page of the Properties dialog box.
 
<b>Note</b>  If you use this method with a Boolean control in a radio buttons control, this method returns an error.
|X
|- style="background-color:#D1BB80;"
|6331C08
| [[Control class/Copy Wizard Template method|Copy Wizard Template]]
|
|
|- style="background-color:#CCFFFF;"
|6331C01
| [[Control class/Create.Control Ref method|Create.Control Ref]]
|Creates a control reference for the control and returns a reference to it.
|
|- style="background-color:#CCFFFF;"
|6331C04
| [[Control class/Create.Invoke Node method|Create.Invoke Node]]
|Creates an Invoke Node for the control and returns a reference to it.
|
|- style="background-color:#CCFFFF;"
|6331C02
| [[Control class/Create.Local Var method|Create.Local Var]]
|Creates a local variable for the control and returns a reference to it.
|
|- style="background-color:#CCFFFF;"
|6331C03
| [[Control class/Create.Property Node method|Create.Property Node]]
|Creates a Property Node for the control and returns a reference to it.
|
|- style="background-color:#FFFFCC;"
|6331C0F
| [[Control class/DataBinding.Bind To Network Path method|DataBinding.Bind To Network Path]]
|Binds a control to an NI Publish-Subscribe Protocol (NI-PSP) network path. You can add new connections only at edit time.
 
This method is similar to the <b>Data Binding Selection</b> and <b>Access Type</b> options on the <b>Data Binding</b> page of the Properties dialog box.
|X
|- style="background-color:#D1BB80;"
|6331C11
| [[Control class/DataBinding.Bind To Network Variable method|DataBinding.Bind To Network Variable]]
|
|X
|- style="background-color:#FFFFCC;"
|6331C12
| [[Control class/DataBinding.Unbind method|DataBinding.Unbind]]
|Unbinds a control from an NI Publish-Subscribe Protocol (NI-PSP) network path.
|X
|- style="background-color:#CCFFFF;"
|6331C14
| [[Control class/DataOp.CopyData method|DataOp.CopyData]]
|Copies data from the control to the clipboard.
|X
|- style="background-color:#CCFFFF;"
|6331C15
| [[Control class/DataOp.PasteData method|DataOp.PasteData]]
|Pastes data from the clipboard to the control.
|X
|- style="background-color:#CCFFFF;"
|6331C09
| [[Control class/Disconnect From Typedef method|Disconnect From Typedef]]
|Disconnects the control from the type definition and returns TRUE. If the control is not connected to a type definition, LabVIEW returns FALSE.
|
|- style="background-color:#FFFFCC;"
|6331C13
| [[Control class/FitControlToPane method|FitControlToPane]]
|Resizes the control to the size of the pane that contains it and sets the control to scale with the pane.
|X
|- style="background-color:#FFFFCC;"
|6331C0C
| [[Control class/Get Image method|Get Image]]
|Returns an image of a front panel object.
 
This method is similar to the Front Panel:Get Image method.
 
If a front panel is not visible, LabVIEW does not update the values in the objects on the front panel. If you call a VI whose front panel is not visible and you use the Get Image method to create an image of a front panel object, the image does not reflect any value changes that occurred when you ran the VI.
 
If you want the image to reflect value changes, make sure the front panel is open before any values change. If you do not want to display the front panel but want the image to reflect value changes, create a Property Node from any terminal on the block diagram of the VI for which you want to create a front panel control image.
 
You also can use the Append Control Image to Report VI to create an image of a front panel object and append it to a report.
|X
|- style="background-color:#FFFFCC;"
|6331C0D
| [[Control class/Get Term Image method|Get Term Image]]
|Returns an image of the block diagram terminal of a front panel object.
|X
|- style="background-color:#FFFFCC;"
|6331C00
| [[Control class/Reinit To Default method|Reinit To Default]]
|Reinitializes the value of the control to the default value.
 
This method is similar to the <b>Data Operations&#0187;Reinitialize to Default Value</b> item on the shortcut menu of a control.
 
<b>Note</b>  If you use this method with a Boolean control in a radio buttons control, this method returns an error.
|X
|- style="background-color:#FFFFCC;"
|6331C07
| [[Control class/Remove DataSocket method|Remove DataSocket]]
|Removes an opc, ftp, and http connection from a control on Windows, and a dstp and file connection from a control on all LabVIEW-supported platforms.
 
This method is similar to the <b>Unbound</b> option of the <b>Data Binding Selection</b> pull-down menu on the <b>Data Binding</b> page of the Properties dialog box.
 
<b>Note</b>  If you use this method with a Boolean control in a radio buttons control, this method returns an error.
Use the Data Binding:Unbind method to remove psp connections.
|X
|- style="background-color:#FFFFCC;"
|6331C0E
| [[Control class/Start Drag method|Start Drag]]
|Starts a drag and drop operation using the specified control as the source.
 
You can use this method to start drag and drop operations in response to user-defined actions instead of the built-in behavior with string, tree, listbox, and multicolumn listbox controls. For controls other than the string, tree, listbox, and multicolumn listbox, the Start Drag method is the only way to start a drag using this control as a drag source.
 
You must specify what data to provide during the drag and drop operation. Optionally, you can specify the drag mode, and corresponding default cursor feedback, to reflect whether this drag and drop operation supports moving the data instead of only copying it. During a drag and drop operation, only drag and drop events are available. Mouse events are not available.
 
If there is already a drag in progress, LabVIEW returns an error. If you pass an empty array for the data parameter, the drag operation does not start and LabVIEW returns an error. If the array of data passed contains duplicate data names or data that conflicts with built-in types, LabVIEW returns an error.
 
After you use this method, LabVIEW remains in the middle of a drag and drop operation until the user cancels the drag by pressing the  key or lifting the mouse button, or until a window opens in front of the window that has the source control.
 
The <b>Drag Data</b> parameter is an array of clusters, each cluster containing a label and corresponding data. Each label must be unique and cannot use the LV_ prefix. Each element of the array must be of the same data type. The <b>Drag Mode</b> parameter specifies the operation of the drag, such as copy, move, or copy and move. If you select copy or move, pressing the &#60;Ctrl&#62; key copies the item.
 
Example
|X
|- style="background-color:#D1BB80;"
|6331C16
| [[Control class/Stub.Convert To Stub method|Stub.Convert To Stub]]
|
|
|- style="background-color:#D1BB80;"
|6331C17
| [[Control class/Stub.Revert From Stub method|Stub.Revert From Stub]]
|
|
|- style="background-color:#CCFFFF;"
|6331C0A
| [[Control class/Update Typedef method|Update Typedef]]
|Updates the control from the type definition and returns TRUE. If the control is not connected to a type definition, LabVIEW returns FALSE.
 
In most cases, LabVIEW correctly preserves the default values of each instance when updating from the type definition. However, if LabVIEW is unable to map the previous default values to the updated controls or constants when updating instances, LabVIEW may lose or incorrectly preserve the default values of instances LabVIEW updates programmatically. Avoid updating type definition instances programmatically if the instances have custom default values and you plan to make extensive changes to the type definition.
|
|}
</div>
 
==Events==
<span class="mw-customtoggle-eventstable">Show/Hide Control Events Table</span>
<div class="mw-collapsible" id="mw-customcollapsible-eventstable">
{{VIServerLegend}}
{| class="wikitable sortable"
|+ Control Events Table
! Code
! Name
! Type
|- style="background-color:#FFFFCC;"
|1073741869
|[[Control class/Drag Ended event|Drag Ended]]
|Notify
|- style="background-color:#FFFFCC;"
|2684354617
|[[Control class/Drag Enter event|Drag Enter]]
|Filter
|- style="background-color:#FFFFCC;"
|1073741885
|[[Control class/Drag Leave event|Drag Leave]]
|Notify
|- style="background-color:#FFFFCC;"
|2684354618
|[[Control class/Drag Over event|Drag Over]]
|Filter
|- style="background-color:#FFFFCC;"
|2684354606
|[[Control class/Drag Source Update event|Drag Source Update]]
|Filter
|- style="background-color:#FFFFCC;"
|1073741867
|[[Control class/Drag Starting event|Drag Starting]]
|Notify
|- style="background-color:#FFFFCC;"
|2147483692
|[[Control class/Drag Starting? event|Drag Starting?]]
|Filter
|- style="background-color:#FFFFCC;"
|2684354622
|[[Control class/Drop event|Drop]]
|Filter
|- style="background-color:#FFFFCC;"
|1073741847
|[[Control class/Key Down event|Key Down]]
|Notify
|- style="background-color:#FFFFCC;"
|2147483658
|[[Control class/Key Down? event|Key Down?]]
|Filter
|- style="background-color:#FFFFCC;"
|1073741848
|[[Control class/Key Repeat event|Key Repeat]]
|Notify
|- style="background-color:#FFFFCC;"
|2147483659
|[[Control class/Key Repeat? event|Key Repeat?]]
|Filter
|- style="background-color:#FFFFCC;"
|1073741836
|[[Control class/Key Up event|Key Up]]
|Notify
|- style="background-color:#FFFFCC;"
|1073741842
|[[Control class/Mouse Down event|Mouse Down]]
|Notify
|- style="background-color:#FFFFCC;"
|2147483655
|[[Control class/Mouse Down? event|Mouse Down?]]
|Filter
|- style="background-color:#FFFFCC;"
|1073741839
|[[Control class/Mouse Enter event|Mouse Enter]]
|Notify
|- style="background-color:#FFFFCC;"
|1073741838
|[[Control class/Mouse Leave event|Mouse Leave]]
|Notify
|- style="background-color:#FFFFCC;"
|1073741833
|[[Control class/Mouse Move event|Mouse Move]]
|Notify
|- style="background-color:#FFFFCC;"
|1073741832
|[[Control class/Mouse Up event|Mouse Up]]
|Notify
|- style="background-color:#FFFFCC;"
|1073741905
|[[Control class/Mouse Wheel event|Mouse Wheel]]
|Notify
|- style="background-color:#FFFFCC;"
|2147483699
|[[Control class/Shortcut Menu Activation? event|Shortcut Menu Activation?]]
|Filter
|- style="background-color:#D1BB80;"
|1073741892
|[[Control class/Shortcut Menu Dismissed event|Shortcut Menu Dismissed]]
|Notify
|- style="background-color:#FFFFCC;"
|1073741878
|[[Control class/Shortcut Menu Selection (App) event|Shortcut Menu Selection (App)]]
|Notify
|- style="background-color:#FFFFCC;"
|1073741876
|[[Control class/Shortcut Menu Selection (User) event|Shortcut Menu Selection (User)]]
|Notify
|- style="background-color:#FFFFCC;"
|2147483701
|[[Control class/Shortcut Menu Selection? (App) event|Shortcut Menu Selection? (App)]]
|Filter
|- style="background-color:#FFFFCC;"
|1073741826
|[[Control class/Value Change event|Value Change]]
|Notify
|}
</div>


== History ==
== History ==
{{ambox|text=History information is needed.  What changes have occured over previous versions?}}
{{ambox|text=History information is needed.  What changes have occurred over previous versions?}}
{| class="wikitable"
{| class="wikitable"
! Version
! Version
Line 819: Line 25:
*[[VI Scripting]]
*[[VI Scripting]]


[[Category:VI Server]]
[[Category:VI Server Class]]
[[Category:VI Server Class]]
[[Category:VI Scripting]]

Latest revision as of 01:45, 8 May 2020

VI Server Class Information
Return to VI Server Class Hierarchy
Class Name Control class
Class ID 6
Scope Basic Development Environment
Class Inheritance
Class Children


The Control class is a class in the VI Server Class Hierarchy, (see also VI Server).

Properties

Show/Hide Control Properties Table

Legend
R/WReadable/Writable Permissions
RTEAvailable in the Run-Time Engine
Basic Development Environment
VI Scripting
Private
Deprecated
Control Properties Table
Property ID Long Name (English) Description R/W RTE
6332000VisibleDisplays the front panel control.Read/WriteYes
6332001DisabledIndicates whether you can operate the control.Read/WriteYes
6332002Key FocusIf TRUE, the control has key focus and receives the keys pressed on the keyboard.Read/WriteYes
6332003BlinkingIf TRUE, the control blinks.Read/WriteYes
6332004CaptionReference to the caption object. You can use this reference with the Text properties.Read OnlyYes
6332005LabelReference to the label object.Read OnlyYes
6332006TerminalReturns the reference to the block diagram terminal of this control. Use this property to navigate between the front panel and the block diagram of a VI.Read OnlyNo
6332007IndicatorIf TRUE, the front panel object is an indicator. If FALSE, the object is a control.Read/WriteYes (Read Only)
6332008Synchronous DisplayWhen TRUE, enables synchronous display that shows every update to a data value in a control or indicator. When FALSE, asynchronous display permits the execution system to reduce updates to a slower rate and spend more time executing VIs.Read/WriteYes (Read Only)
6332009Control Reference Nodes[]Returns references to the control reference nodes of this control.Read OnlyNo
633200ALocal Variables[]Returns references to the local variables of this control.Read OnlyNo
633200BProperty Nodes[]Returns references to the property nodes of this control.Read OnlyNo
633200CInvoke Nodes[]Returns references to the invoke nodes of this control.Read OnlyNo
633200DValueData value of the control (LV variant). If this is a Boolean value configured with a latching mechanical action, this property always returns an error. Due to race conditions that can occur when you have a Boolean value with latching mechanical action, you cannot programmatically read Boolean values that are set with a latching mechanical action.Read/WriteYes
633200EDefault ValueDefault value of the control (LabVIEW variant).Read/WriteYes (Read Only)
633200FDescriptionDescription of the front panel object that appears in the Context Help window when you move the cursor over the object and in VI documentation you generate.Read/WriteYes
6332010Focus Key BindingSets a shortcut key to navigate to this control.Read/WriteYes
6332011Type DescriptorRead OnlyYes
6332014Tip StripSets or returns the tip strip of a control. A tip strip is the brief description of the object that appears when you move the cursor over the object.Read/WriteYes
6332015DataSocket:URLGets or sets the URL to which the control is connected. Valid URLs for using the DataSocket properties to connect controls are the opc, ftp, and http protocols on Windows, and the dstp and file protocols on all LabVIEW-supported platforms.Read/WriteYes
6332016DataSocket:ModeGets or sets the mode of the data connection.Read/WriteYes
6332017DataSocket:EnabledThis is the enabled state of the opc, ftp, and http connection on Windows, and the dstp and file connection on all LabVIEW-supported platforms. A connection can transfer data only when enabled.Read/WriteYes
6332018DataSocket:StatusReturns the status of the data connection. The connection status can be Invalid Status, Unconnected, Active, Idle, Error, or Connecting.Read OnlyYes
6332019Wizard DataRead/WriteYes
633201AIs Typedef?Returns whether the control is linked to the type definition.Read OnlyYes (Read Only)
633201BTypedef:PathReturns the path to the type definition if the control is linked to a type definition. Otherwise, LabVIEW returns an empty path.Read OnlyYes (Read Only)
633201CAuto-Update From TypedefIf TRUE, the control automatically updates when the type definition changes.Read/WriteYes
633201DBit Accurate Data SizeRead OnlyYes
633201EDataSocket:LED VisibleShows or hides the connection status indicator.Read/WriteYes
633201FLatch ValueRead/WriteYes
6332020Is On Connector PaneReturns whether a control or indicator is on the connector pane of a VI.Read OnlyYes
6332021Skip When TabbingIf TRUE, LabVIEW skips this control when you tab through the front panel.Read/WriteYes
6332022Has CaptionReturns TRUE if the control has a caption.Read OnlyYes
6332023Value (Signaling)Sets the value of the control and generates a Value Change event.Write OnlyYes
6332025Typedef:VIReturns a reference to the type definition if the control is connected to a type definition. Otherwise, LabVIEW returns <NotARef>.Read OnlyNo
6332026C TypeRead OnlyYes
6332027Type Descriptor (Full)Read OnlyYes
6332028Data Binding:PathReads or writes the NI Publish-Subscribe Protocol (NI-PSP) URL to which the control is connected. To write this property, you must bind the control to the PSP URL before you begin writing.Read/WriteYes
6332029Data Binding:ModeGets or sets the mode of the data connection.Read/WriteYes
633202AData Binding:StatusReturns the status of the data connection. The connection status can be Invalid Status, Unconnected, Active, Idle, Error, or Connecting.Read OnlyYes
633202BData Binding:LED VisibleShows or hides the data binding indicator.Read/WriteYes
633202CData Binding:Persist IDRead OnlyYes
633202DData Binding:Binding TypeReturns the type of binding.Read OnlyYes
633202EData Binding:Blink On AlarmRead/WriteYes
633202FGrow InfoReturns the growing abilities for this control.Read OnlyYes
6332030Grow Info:Can Grow HorizontallyReturns if this control can grow horizontally.Read OnlyYes
6332031Grow Info:Can Grow VerticallyReturns if this control can grow vertically.Read OnlyYes
6332032Grow Info:Min HorizontallyReturns the minimum size horizontally this control can grow.Read OnlyYes
6332033Grow Info:Min VerticallyReturns the minimum size vertically this control can grow.Read OnlyYes
6332034Grow Info:Max HorizontallyReturns the maximum size horizontally this control can grow.Read OnlyYes
6332035Grow Info:Max VerticallyReturns the maximum size vertically this control can grow.Read OnlyYes
6332036XControl:Is XControl?Returns TRUE if the control is an XControl, FALSE otherwise.Read OnlyYes
6332037XControl:Container BoundsSets or gets the container bounds of the XControl.Read/WriteYes
6332038XControl:Container Bounds:WidthWidth of the XControl.Read/WriteYes
6332039XControl:Container Bounds:HeightHeight of the XControl.Read/WriteYes
633203AStyle IDReturns the style of the control.Read OnlyYes
633203BIs Stub?Read OnlyYes
633203CGenericityRead/WriteYes
633203DDisabledIndicates whether you can operate the control.Read/WriteYes
633203EOwning PaneReturns a reference to the pane that owns the referenced control.Read OnlyYes
633203FBuilt-In Mouse Wheel SupportSets the conditions under which the control responds to mouse wheel movement.Read/WriteYes
6332040Control IndexGets the index of the control or indicator you specify. If the control or indicator for which you want to get the index does not have a terminal on the block diagram, this property returns an error.Read OnlyYes
6332041Value (Undoable)Write OnlyYes
6332043Default Value (Undoable)Write OnlyNo

Methods

Show/Hide Control Properties Table

Legend
RTEAvailable in the Run-Time Engine
Basic Development Environment
VI Scripting
Private
Deprecated
Control Methods Table
Method ID Long Name (English) Description RTE
6331C00Reinitialize To DefaultReinitializes the value of the control to the default value.Yes (Read/Write)
6331C01Create:Control ReferenceCreates a control reference for the control and returns a reference to it.No
6331C02Create:Local VariableCreates a local variable for the control and returns a reference to it.No
6331C03Create:Property NodeCreates a Property Node for the control and returns a reference to it.No
6331C04Create:Invoke NodeCreates an Invoke Node for the control and returns a reference to it.No
6331C05Old Get ImageYes
6331C06Attach DataSocketNational Instruments recommends using front panel data binding through the Shared Variable Engine or using the Bind To Network Path method to attach a data connection to a control.Yes (Read/Write)
6331C07Remove DataSocketRemoves an opc, ftp, and http connection from a control on Windows, and a dstp and file connection from a control on all LabVIEW-supported platforms.Yes (Read/Write)
6331C08Copy Wizard TemplateNo
6331C09Disconnect From TypedefDisconnects the control from the type definition and returns TRUE. If the control is not connected to a type definition, LabVIEW returns FALSE.No
6331C0AUpdate From TypedefUpdates the control from the type definition and returns TRUE. If the control is not connected to a type definition, LabVIEW returns FALSE.No
6331C0BOld Get FP Term ImageYes
6331C0CGet ImageReturns an image of a front panel object.Yes (Read/Write)
6331C0DGet Terminal ImageReturns an image of the block diagram terminal of a front panel object.Yes (Read/Write)
6331C0EStart DragStarts a drag and drop operation using the specified control as the source.Yes (Read/Write)
6331C0FData Binding:Bind To Network PathBinds a control to an NI Publish-Subscribe Protocol (NI-PSP) network path. You can add new connections only at edit time.Yes (Read/Write)
6331C11Data Binding:Bind To Network VariableYes
6331C12Data Binding:UnbindUnbinds a control from an NI Publish-Subscribe Protocol (NI-PSP) network path.Yes (Read/Write)
6331C13Fit Control To PaneResizes the control to the size of the pane that contains it and sets the control to scale with the pane.Yes (Read/Write)
6331C14Data Operations:Copy DataCopies data from the control to the clipboard.Yes (Read/Write)
6331C15Data Operations:Paste DataPastes data from the clipboard to the control.Yes (Read/Write)
6331C16Stub:Convert To StubNo
6331C17Stub:Revert From StubNo

Events

Show/Hide Control Events Table

Legend
Basic Development Environment
VI Scripting
Private
Deprecated
Control Events Table
Code Name Description Type
1073741869Drag EndedGenerated after a drag and drop operation completes.Notify
2684354617Drag EnterGenerated when there is a drag operation pending and the cursor enters the bounds of a control.Notify
1073741885Drag LeaveGenerated when there is a drag operation pending and the mouse leaves a control that can accept a drag, or if a user cancels a drag and drop operation when hovering over a control.Notify
2684354618Drag OverGenerated when there is a drag and drop operation pending, as the mouse moves over a control.Notify
2684354606Drag Source UpdateGenerated when the mouse moves or a key state changes during a drag and drop operation.Notify
1073741867Drag Starting
2147483692Drag Starting?
2684354622DropGenerated when the user lifts the mouse when hovering over a control when there is a drag and drop operation pending.Notify
1073741847Key DownGenerated on a control that has keyboard focus. If a key press matches a keyboard shortcut in the VI menu, such as Ctrl-C or Ctrl-V, LabVIEW does not generate a Key Down event, regardless of whether the menu item is enabled. Key Down Event Caveats
  • (Windows) F3 generates a Key Down event only in the LabVIEW Run-Time Engine.
  • LabVIEW only generates events for the Cluster»All Elements source when the cluster has keyboard focus, not when an individual element inside the cluster has keyboard focus.
Notify
2147483658Key Down?Generated on a control that has keyboard focus. If a key press matches a keyboard shortcut in the VI menu, such as Ctrl-C or Ctrl-V, LabVIEW does not generate a Key Down event, regardless of whether the menu item is enabled.Filter
1073741848Key RepeatGenerated at regular intervals when the user presses and holds a key in a front panel control.Notify
2147483659Key Repeat?Generated when the user presses and holds a key in a front panel control.Filter
1073741836Key UpGenerated when the user releases a key on the keyboard in a specific control on the front panel.Notify
1073741842Mouse DownGenerated when you click the mouse button on a specific control.Notify
2147483655Mouse Down?Generated when you click the mouse button on a specific control.Filter
1073741839Mouse EnterGenerated when the cursor enters the bounds of the front panel object.Notify
1073741838Mouse LeaveGenerated when the cursor leaves the bounds of the front panel object.Notify
1073741833Mouse MoveGenerated when you move the mouse over a control.Notify
1073741832Mouse UpGenerated when you release the mouse button on a specific control. LabVIEW does not generate this event if a shortcut menu appears when you click the mouse button.Notify
1073741905Mouse WheelGenerated when you scroll the mouse wheel over a control.Notify
2147483699Shortcut Menu Activation?Generated when the user right-clicks a control to display the shortcut menu.Filter
1073741892Shortcut Menu Dismissed
2147483701Shortcut Menu Selection? (App)Generated when the user selects an application item from the shortcut menu. This event is posted before the application item is processed by LabVIEW.Filter
1073741878Shortcut Menu Selection (App)Generated when the user selects an application item from the shortcut menu of a control. Use the Shortcut Menu Selection (User) event to generate an event when the user selects a user-defined menu item. This event is posted after the built-in shortcut menu item is processed by LabVIEW.Notify
1073741876Shortcut Menu Selection (User)Generated when the user selects a user-defined item from the shortcut menu. Use the Shortcut Menu Selection (App) event to generate an event when the user selects an application item from the shortcut menu.Notify
1073741826Value ChangeGenerated when the user changes the value of a control. You must read the terminal of a latched Boolean control in its Value Change event case.Notify


History

Version Change(s)
LabVIEW 2018 More info to come.

See Also