int AddCtrlToSplitter (int panel, int control, int anchor, int attachedControl, int snapOnAttach, int move);
Attaches a new control to the splitter control. Once attached, this control is automatically sized or moved whenever you operate the splitter.
The control to be attached must already be present in the same panel as the splitter.
Input | ||||||||||||
Name | Type | Description | ||||||||||
panelHandle | integer | Specifier for a particular panel that is currently in memory. You obtain this handle from LoadPanel, NewPanel, or DuplicatePanel. | ||||||||||
controlID | integer | 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 NewCtrl or DuplicateCtrl. | ||||||||||
anchor | integer | This parameter determines to which edge of the splitter control you are attaching the control. For horizontal splitters, valid choices are VAL_TOP_ANCHOR and VAL_BOTTOM_ANCHOR. For vertical splitters, valid choices are VAL_LEFT_ANCHOR and VAL_RIGHT_ANCHOR.
Which edge of the splitter you attach a control determines how the control is sized. For example, if you attach a control to the left edge of the splitter, then the right edge of the control follows the splitter, thus sizing the control. |
||||||||||
controlID | integer | The control to attach. Pass 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 NewCtrl or DuplicateCtrl. |
||||||||||
snapOnAttach | integer | Pass TRUE if you want the control that is being attached to automatically move to the corresponding edge of the splitter control. For example, if you pass VAL_BOTTOM_ANCHOR as the anchor parameter, LabWindows/CVI places the control immediately below the splitter. In this case, the horizontal position of the control would not be affected. | ||||||||||
move | integer |
Pass TRUE if you want the control that is being attached to be moved instead of sized, whenever you operate the splitter control. If you pass FALSE, you must ensure that the type of control that you are attaching can be sized in the direction that is perpendicular to the splitter control. |
Name | Type | Description | ||||
status | integer | Return value indicating whether the function was successful. A negative number indicates that an error occurred.
|