GetTreeItemAttributeLimited
int GetTreeItemAttributeLimited (int panelHandle, int controlID, int itemIndex, int itemAttribute, int maximumNumberOfBytes, int *numberOfBytesCopied, unsigned char stringValue[]);
Purpose
This function returns as much of the tree item attribute value as fits within maximumNumberOfBytes. GetTreeItemAttributeLimited returns values only for attributes with a string data type, such as ATTR_LABEL_FONT and ATTR_TOOLTIP_TEXT.
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 that contains the cell for which you want to get the attribute value. Pass VAL_DFLT_FOR_NEW_OBJECTS to get the default attribute for cells created in the future in the specified column. |
itemAttribute | int | The tree item attribute value to obtain. You must specify an attribute with a string data type. |
maximumNumberOfBytes | int | The maximum number of bytes to obtain from the string value, including the ASCII NUL byte. |
Output | ||
Name | Type | Description |
numberOfBytesCopied | int | Returns the number of bytes successfully obtained, including the ASCII NUL byte. |
stringValue | unsigned char [] | Returns the value of the tree item attribute that fits within maximumNumberOfBytes. |
Return Value
Name | Type | Description |
status | int | Returns 0 if the function succeeded or a negative error code if the function failed. You can obtain a description of any of these error codes using the GetGeneralErrorString function in the toolbox.fp instrument driver. |
Additional Information
Library: Programmer's Toolbox
Include file: toolbox\toolbox.h
LabWindows/CVI compatibility: LabWindows/CVI 2012 and later