Admin Production ni-theme
Current Publication

SetAttributeToExtremeForList

LabWindows/CVI

SetAttributeToExtremeForList

int SetAttributeToExtremeForList (int panel, ListType listOfControls, int attribute, int whichExtreme);

Purpose

This function examines the value of a control attribute for each control in the list. It then sets the value of that attribute in each control to either the largest or the smallest value it found, depending on the setting of the whichExtreme parameter.

This function can be used to size and position controls when creating dialogs programmatically.

Parameters

Input
Name Type Description
panel int The specifier for a particular panel that is currently in memory.

This handle will have been returned by the LoadPanel, NewPanel, or DuplicatePanel function.
listOfControls ListType This parameter should be a list of control IDs (see the Lists... class of functions).
attribute int Specify which attribute to set in the designated controls. The data type of the attribute must be integer (example: ATTR_TOP, ATTR_WIDTH).
whichExtreme int This parameter specifies whether to set the value of the attribute in every control in the list to the largest or to the smallest value of the attribute currently set for any of the designated controls.

If you specify VAL_TB_MAX or select Maximum in the function panel, the function uses the largest value of the attibute.

If you specify VAL_TB_MIN or select Minimum in the function panel, the function uses the smallest value of the attribute.

Return Value

Name Type Description
status int Returns 0 if the function succeeded or a negative error code if the function failed.

The possible negative error codes are:

–1 to –999 A User Interface Library error code. (constants are available in userint.h)

A description of any of these error codes can be obtained 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 4.0 and later