Admin Production ni-theme
Current Publication

SetColumnWidthToWidestCellContents

LabWindows/CVI

SetColumnWidthToWidestCellContents

int SetColumnWidthToWidestCellContents (int panelHandle, int controlID, int columnIndex);

Purpose

Sets the width of the specified tree or table column to the width of the column's widest cell contents.

For tree columns, only the width of exposed tree items are taken into account when calculating the widest cell contents.

Supported Controls

You can use SetColumnWidthToWidestCellContents with the following 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 Index of the column for which you want to set the width. It is zero-based for a tree and one-based for a table.

Return Value

Name Type Description
width int Returns the resulting width of the specified column. 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