setRightSoftkeyLabel()

Syntax:

[void] window.menu.setRightSoftkeyLabel(String label, Function callbackfunc) 

or

[void] menu.setRightSoftkeyLabel(String label, Function callbackfunc)

Description:

Call the setRightSoftkeyLabel method to customize the label and the operation associated with the right softkey.

By default, the right softkey of a device is assigned to the "Exit" function, which terminates a running widget. The default label depends on the current used system language (Exit for English).

Arguments:

Return value:

This method does not return a value.

Remarks:

The default label and "Exit" function of the right softkey can be restored by calling the setRightSoftkeyLabel with an empty string ('') specified for the label argument and the callbackfunc argument set to null.

Example code:

function switchToSettingsView()
{
 // implement and show settings
 ...
 // customize the right softkey
 window.menu.setRightSoftkeyLabel('Back', returnToMainView);
}
function returnToMainView()
{
  // show main view
 ...
 // restore the default right softkey   
 window.menu.setRightSoftkeyLabel('', null);
}