Edit Tree Items:Add Item Method

LabView Local Project Settings

Edit Tree Items:Add Item Method

Short Name: Edit Tree Items.Add Item

Installed With: Full Development System

Class: TreeControl Methods

Adds an item to the tree control.

This method is similar to the Insert Item Before item on the shortcut menu of a tree control.

Example

Parameters

NameRequiredDescription
Parent TagNoUnique tag of the item under which you want to add the new item. The default is an empty string, which adds the item to the highest level in the hierarchy.
Child PositionNoSets where to place the new item in relation to the item whose tag you wire to Parent Tag. Wire a value of 0 (default) to place the new item directly under the parent item. Wire a value of 1 to place the new item under the first child item, a value of 2 to place the new item under the second child item, and so on. Wire a value of –1 to place the new item under the last child item. If the value you wire to this input is greater than the number of child items under the parent item, the method places the new item under the last child item.
Left Cell StringNoText to display in the leftmost cell for the new item. The default is an empty string.
Child TextNoArray of strings to display in the remaining cells for the new item. The default is an array of empty strings.
Child TagNoUnique tag for the new item. The default is the string you wire to Left Cell. If an existing tag already uses that string, LabVIEW appends a number to the string to create a unique tag for the new item. You cannot create a tag that begins with TREE_. All tags that begin with TREE_ are reserved for use by LabVIEW. If the tag you wire to the method begins with TREE_, LabVIEW prepends an underscore (_) to create a valid tag for the new item. If the tag you wire to the method begins or ends with white space, LabVIEW removes the white space.
Child Only?NoIf TRUE, you cannot indent other items under the new item. The default is FALSE. This property is similar to the Child-Only Item item on the shortcut menu of a tree control.
outputNoTag for the new item.

Remarks

The following table lists the characteristics of this method.

Available in Run-Time Engine and Real-Time Operating SystemYes (Read/Write)
Settable when the VI is runningYes
Loads the front panel into memoryNo
Need to authenticate before useNo
Loads the block diagram into memoryNo
Remote access disallowedNo
Must wait until user interface is idleNo
Available with control VIsNo
Available with global VIsNo
Available with strict type definitionsNo
Available with polymorphic VIsNo

Example

Refer to the Directory Hierarchy in Tree Control VI in the labview\examples\general\controls\Tree Control Directory.llb for an example of using the Edit Tree Items:Add Item method.

 Open example  Browse related examples