CAPL Script

SetDefaultControlColors

Syntax

void SetDefaultControlColors(char[] panel, char[] control);

Function

Sets back the background and text color of panel elements as defined in thePanel Designer. The panel is accessed by its individual panel name that is entered in thePanel Designer.

Parameters

panel Panel name, restricted to 128 characters."" – references 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.

Return Values

//Set the default background and text color for a specific control of a panel.SetDefaultControlColors("motor", "PedalPos"); //All controls of the panel are set to the default background and text color as defined in the Panel Designer.SetDefaultControlColors("motor", ""); //All controls of all panels are set to the default background and text color as defined in the Panel Designer.SetDefaultControlColors("", "");

SetControlProperty | SetControlForeColor | SetControlBackColor | SetControlColors