XControl: Difference between revisions
m →[[XControl:Abilities|Abilites]]: typo |
No edit summary |
||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{| | |||
{| border="0" align="right" | |||
|- | |- | ||
| __TOC__ | |||
|} | |} | ||
Essentially an XControl is a front panel object with dedicated code linked in to react on certain user events. | == Introduction == | ||
XControls are introduced in LabVIEW 8.0 and enhance the power of front panel objects in great ways. | |||
Essentially an XControl is a front panel object with dedicated code linked in to react on certain user events. | |||
An XControl exists of several parts, managed in a .xctl file. The .xctl file is a XML-file like the project-file. Other parts of the XControl are abilities. | An XControl exists of several parts, managed in a .xctl file. The .xctl file is a XML-file like the project-file. Other parts of the XControl are abilities. | ||
== | == Limitations == | ||
An XControl functions like a subpanel in the hosting VI. Subpanels (and therefore XControls) ''can not'' be placed inside an array. Note that you ''can'' define your XControl data as an array of any LabVIEW data type, and you ''can'' use array controls in the facade vi. | |||
Using LabVIEW native objects (.lvclass files) inside the state control of an XControl tends to crash LabVIEW for versions less than 8.5.1 when the XControl is used in a different application instance. | |||
== | == Tricks == | ||
*If you require a variable number of runtime instances of your XControl, Jarrod Slocum of [[National Instruments]] has created an example [http://community.ni.com/examples/linked-object-list-in-labview-8-0-using-xcontrols Linked Object List] based on a Subpanel ''inside'' an XControl. | |||
*If you want to react to dynamic events (or user events) you need them to register at the XControl Facade '''before''' the event happens. | |||
== | == See also == | ||
* | *[[XControl:Properties|Properties]] | ||
*[[XControl:Abilities|Abilities]] | |||
*[[XControl:Methods|Methods]] | |||
[[Category:XControl]] | [[Category:XControl]] |
Revision as of 07:51, 3 February 2009
Introduction
XControls are introduced in LabVIEW 8.0 and enhance the power of front panel objects in great ways.
Essentially an XControl is a front panel object with dedicated code linked in to react on certain user events.
An XControl exists of several parts, managed in a .xctl file. The .xctl file is a XML-file like the project-file. Other parts of the XControl are abilities.
Limitations
An XControl functions like a subpanel in the hosting VI. Subpanels (and therefore XControls) can not be placed inside an array. Note that you can define your XControl data as an array of any LabVIEW data type, and you can use array controls in the facade vi.
Using LabVIEW native objects (.lvclass files) inside the state control of an XControl tends to crash LabVIEW for versions less than 8.5.1 when the XControl is used in a different application instance.
Tricks
- If you require a variable number of runtime instances of your XControl, Jarrod Slocum of National Instruments has created an example Linked Object List based on a Subpanel inside an XControl.
- If you want to react to dynamic events (or user events) you need them to register at the XControl Facade before the event happens.