Admin Production ni-theme
Current Publication

InsertTreeColumn

LabWindows/CVI

InsertTreeColumn

int InsertTreeColumn (int panelHandle, int controlID, int columnIndex, char columnLabel[]);

Purpose

Inserts a column into the tree control at the specified zero-based index.

Inserting a new column causes the indices of existing columns at and beyond the insertion point to increase by one.

The function returns the index of the new column or an error.

Supported Controls

You can use InsertTreeColumn 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.
columnIndex int Zero-based index into the tree where InsertTreeColumn places the new column. You cannot insert a column at index 0.

Pass –1 to insert the column as the last column.
columnLabel char [] Label of the new tree column.

You can pass NULL for the label.

Return Value

Name Type Description
columnIndex int Returns the index of the inserted column. Use the index to specify the tree column in subsequent function calls. Negative values indicate that an error occurred.

Additional Information

Library: User Interface Library

Include file: userint.h

LabWindows/CVI compatibility: LabWindows/CVI 7.0 and later

Example

Refer to userint\TreeBusDigitalGraph.cws for an example of using the InsertTreeColumn function.