Admin Production ni-theme
Current Publication

PositionCtrlRelativeToCtrl

LabWindows/CVI

PositionCtrlRelativeToCtrl

int PositionCtrlRelativeToCtrl (int panel, int ctrl, int considerLabel, int ctrlToMove, int considerCtrlToMoveLabel, int gap, PositionCtrlSide whichSide, PositionCtrlJustification justification);

Purpose

This function moves one control relative to another on a panel.

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.
ctrl int Pass the ID of the control which the other control will be moved relative to. This control is called the reference control.

The ID is the defined constant (located in the UIR header file) which was assigned to the control in the User Interface Editor, or the ID returned by the NewCtrl or DuplicateCtrl function.
considerLabel int Specifies whether to include the label of the reference control when moving the other control.

Specify a nonzero value or select On in the function panel to include the label.

Specify 0 or select Off in the function panel to ignore the label.
ctrlToMove int Pass the ID of the control to move relative to the other control.

The ID is the defined constant (located in the UIR header file) which was assigned to the control in the User Interface Editor, or the ID returned by the NewCtrl or DuplicateCtrl function.
considerCtrlToMoveLabel int Specifies whether to move the label of the control as well as the control itself.

Specify a nonzero value or select On in the function panel to move the label.

Specify 1 or select Off in the function panel to ignore the label.
gap int The final distance in pixels between the two controls.
whichSide PositionCtrlSide The second control is moved to this side of the reference control.
justification PositionCtrlJustification Specify the justification of the moved control relative to the reference control.

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 6.0 and later