Admin Production ni-theme
Current Publication

PutLabelsOnLeft

LabWindows/CVI

PutLabelsOnLeft

int PutLabelsOnLeft (int panel, int labelToCtrlGap, int numberOfCtrls, ...);

Purpose

For each control passed, this function places the control's label to the left of the control, centering it vertically with respect to the control.

Since many controls are created with their labels on top, this function can be useful when positioning controls for panels that are created 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.
labelToCtrlGap int Specifies the gap in pixels between the right edge of the label and the left edge of the control.
numberOfCtrls int Specifies how many control IDs are being passed to the function.

Pass zero for this parameter if you want the function to continue through the control argument list until it finds a control ID of zero. This feature makes it unnecessary to count the number of controls passed if the last control ID passed is always a zero.
controlList ... This parameter takes a variable number of comma separated control ID arguments.

If the value of numberOfCtrls is zero, then the last control ID passed should be a zero in order to mark the end of the list of controls. Otherwise, numberOfCtrls should be set to the number of control IDs passed.

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