NewPathCtrl
- Updated2023-02-21
- 2 minute(s) read
int NewPathCtrl (int panel, int control, int numberOfVisibleListItems, int displayFullPath);
Purpose
Creates a new path control. Like other controls, the path control is discarded by DiscardCtrl and DiscardPanel. Refer to the instrument help for more information about using this control.
![]() |
Note This instrument uses the toolbox ChainCtrlCallback function on the path control and the ChainPanelCallback function on the path control's panel and its parent panels. If you change the callback function or callback data of the control or panels, or chain these callback functions, then the resulting behavior is undefined. However, you may set these callback functions and callback data or chain them before converting the string control to a path control. For the same reasons, do not call DuplicatePanel or DuplicateCtrl on any of these panels or the control after the path control has been created. |
Parameters
| Input | ||
| Name | Type | Description |
| panel | int | The handle of the panel for the path control. |
| control | int | The ID of a string control that will be converted into a path control. This control must exist on the panel identified by the panel parameter. |
| numberOfVisibleListItems | int | The number of items to display in the path control's list box. This value determines the height of the path control's list box. |
| displayFullPath | int | Specify a nonzero value or select Yes in the function panel to display matched full paths in the path control list. Specify 0 or select No in the function panel to display only matched file and directory names in the path control list. |
Return Value
| Name | Type | Description |
| status | int | Return value indicating whether the function was successful. A negative number indicates that an error occurred. Call the GetGeneralErrorString toolbox function to get a descriptive error message. |
Additional Information
Library: Path Control
Include file: custctrl\pathctrl.h
LabWindows/CVI compatibility: LabWindows/CVI 7.0 and later

