AddPanelToSplitter
int AddPanelToSplitter (int panelHandle, int controlID, int anchor, int panelToAttach, int snapOnAttach, int attachmentMode);
Purpose
Attaches a new panel to the splitter control. Once attached, this panel is automatically sized or moved whenever you operate the splitter.
The panel to be attached must already be a child panel belonging to the same panel as the splitter.
Supported Controls
You can use AddPanelToSplitter with splitter controls.
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. | ||||||||||
anchor | int | This parameter determines to which edge of the splitter control you are attaching the panel. 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 panel determines how the panel is sized. For example, if you attach a panel to the left edge of the splitter, then the right edge of the panel follows the splitter, thus sizing the panel. |
||||||||||
panelToAttach | int | Pass the specifier for the particular panel that you want to attach. You obtain this handle from LoadPanel, NewPanel, or DuplicatePanel. | ||||||||||
snapOnAttach | int | Specify a nonzero value or select Yes in the function panel if you want the panel 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 panel immediately below the splitter. In this case, the horizontal position of the panel would not be affected. Specify 0 or select No in the function panel otherwise. |
||||||||||
attachmentMode | int | Specify a nonzero value or select Move control in the function panel to move the panel that is being attached when you operate the splitter control. Specify 0 or select Size control in the function panel to size the panel that is being attached when you operate the splitter control. |
Return Value
Name | Type | Description |
status | int | Return value indicating whether the function was successful. A negative number indicates that an error occurred. |
Additional Information
Library: User Interface Library
Include file: userint.h
LabWindows/CVI compatibility: LabWindows/CVI 7.1 and later
Example
Refer to apps\uirview\uirview.cws for an example of using the AddPanelToSplitter function.