rename
Modify the text associated with a tab name, label, or button. Use the Component ID to specify the component to rename. Do not use the Object ID (OID).
To view the ID of a component, double-click the component in PanelBuilder to open the Edit Component dialog box. The ID box displays the ID of the selected component.
ID — use the ID displayed in this box toidentify the component to rename.
Figure 2.1 Component ID in the Edit Component dialog box
Syntax
ogscript.rename (Component ID, Name);
Parameters
Parameter |
Type |
Required |
Description |
Component ID |
String |
Yes |
ID of the user interface component to rename. |
Name |
String |
Yes |
New text to display on the screen for the specified user interface component. |
Returns
N/A
Example 1
// Set the item with ID='Seat5' to have the text 'Mika Andersen' ogscript.rename ('Seat 5','Mika Andersen');
Example 2
// Read the value of a parameter into a variablenamed data var data = params.getValue(0x12,0);
// Use the variable nameddata to make a new ID and set the ID to have the text 'Mika Andersen'
ogscript.rename('Seat ' + data,'Mika Andersen');