MakeMovableCtrl
- Updated2023-02-21
- 7 minute(s) read
int MakeMovableCtrl (int panelHandle, int controlID, const char *configurationName, int controlMovable, int labelMovable, int digitalDisplayMovable, int controlSizable);
Purpose
Causes a control to be movable and sizable at run time. The following operations on the control become defined upon successful return:
<Ctrl-Left-Click> (hold down left mouse button and drag)
- on label: moves the label
- on digital display: moves the digital display
- on control: moves the control
- on edges or corners of control: resize control
<Ctrl-Right-Click>
- on control: center label and digital display
- on label: center label
- on digital display: center digital display
Parameters
| Input | ||||
| Name | Type | Description | ||
| panelHandle | 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. |
||
| controlID | int | The ID of the control you wish to make movable at run time. The ID is the defined constant that was assigned to the control or menu item in the User Interface Editor or the ID returned by NewCtrl or NewMenuItem. If -1, all controls on the panel are affected. |
||
| configurationName | const char * | Pass the name of the configuration to apply to the Movable Control(s). If the configuration is not found, the configuration with the name "Default" is used. Configurations are stored in a file called custctrl.ini located in the same directory as your project or executable. Pass 0 or "" to use the default configuration. You may specify initial settings for the four most commonly used attributes (the last four parameters of this function).
|
||
| controlMovable | int | Specify a nonzero value or select Yes in the function panel to make the control movable. Specify 0 or select No in the function panel to disable moving the control. Note that it is possible to have a movable label or digital display even if the main control is not movable. To move a control, press <Ctrl-Left-Click> (hold down left mouse button and drag) on the main control part. This parameter is ignored if you specify a starting configuration. |
||
| labelMovable | int | Specify a nonzero value or select Yes in the function panel to make the control label movable. Specify 0 or select No in the function panel to disable moving the control label. To move a control label, press <Ctrl-Left-Click> (hold down left mouse button and drag) on the label part. This parameter is ignored if you specify a starting configuration. |
||
| digitalDisplayMovable | int | Specify a nonzero value or select Yes in the function panel to make the digital display movable. Specify 0 or select No in the function panel to disable moving the digital display. To move the digital display, press <Ctrl-Left-Click> (hold down left mouse button and drag) on the digital display part. This parameter is ignored if you specify a starting configuration. |
||
| controlSizable | int | Specify a nonzero value or select Yes in the function panel to make a control sizable. Specify 0 or select No in the function panel to disable sizing the control. To size a control, press <Ctrl-Left-Click> (hold down left mouse button and drag) near the boundaries of the main part of the control. This parameter is ignored if you specify a starting configuration. |
||
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: Run-Time Movable Control
Include file: custctrl\movectrl.h
LabWindows/CVI compatibility: LabWindows/CVI 4.0 and later
Example
Refer to userint\custctrl\movectrl\movedemo.cws for an example of using the MakeMovableCtrl function.
