EnableControl
This reference collection includes Vector documentation reproduced with permission. Snippets may require configuration-specific symbols and are not all standalone programs. Sources and validation limits.
Syntax
void enableControl(char panel[], char control[], long enable);
Function
Selective activation and deactivation of the following elements: If a control and display element is configured as a simple display, this command will have no effect on the element in question.The turned on or turned off state of an element remains intact at the start/end of the measurement. Because of this, a defined state should be created for the beginning of the measurement for the elements involved (for example in the CAPL program under System->Start).
Parameters
panel Name of the panel, restricted to 128 characters. If an empty string is transferred, the action will affect allloaded panelsIf you open a panel the first time, the panel is loaded.
If you close the panel, it remains loaded.
control
- Symbol assignment is not case sensitive.
- If you want to access all elements of a panel the notation "" is used, see example below.
enable
Return Values
—
Reference example from the CANoe 12 help. Check the required configuration, database objects and API availability in your installed version; this is not a recorded compiler or runtime test.
on key 'a'
{
enableControl("gateway", "ElemPanelHelp", 1);
// Activates Panel help in the "gateway" panel.
// enable all controls of the panel
enableControl("gateway", "", 1);
}