Admin Production ni-theme
Current Publication

InsertTreeCellRingItem

LabWindows/CVI

InsertTreeCellRingItem

int InsertTreeCellRingItem (int panelHandle, int controlID, int itemIndex, int columnIndex, int ringIndex, char value[]);

Purpose

Inserts a new item into the list of values of a specified ring or combo box cell of a tree control.

LabWindows/CVI increases the indexes of existing values at and beyond the specified index by one.

Supported Controls

You can use InsertTreeCellRingItem with tree controls.

Parameters

Input
Name Type Description
panelHandle int Specifier for a particular panel that is currently in memory. You can obtain this handle from functions such as LoadPanel and NewPanel.
controlID int The defined constant, located in the .uir header file, that you assigned to the control in the User Interface Editor, or the ID returned by functions such as NewCtrl and DuplicateCtrl.
itemIndex int Zero-based index of the tree item containing the cell for which you want to insert the new value.
columnIndex int Zero-based index of the tree column that contains the cell for which you want to insert the new value.
ringIndex int The zero-based index of the location in the list of values of the cell where you want the new item placed.

Pass –1 to insert the new item at the end of the list of values.

value char [] The new value to insert in the list of values.

If this value matches an existing value in the list, then a new item will not be added to the list.

Return Value

Name Type Description
newItemIndex int Returns the index of the inserted ring item.

If the value already exists in the list, the value is not added and the function returns the index of the existing value.

Negative values indicate that an error occurred.

Additional Information

Library: User Interface Library

Include file: userint.h

LabWindows/CVI compatibility: LabWindows/CVI 2009 and later