diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-5610C4B8-8988-4895-8F88-36F444B4ACFC.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-5610C4B8-8988-4895-8F88-36F444B4ACFC.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,54 @@ + + +setRightSoftkeyLabel()

setRightSoftkeyLabel()

+

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).

+

For more general information on using softkeys in your widget, see Using softkeys.

+

Syntax:

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

or

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

Arguments:

+
    +
  • label:

    + +

    A text string specifies the label to be shown on the right softkey.

    + +
  • +
  • callbackfunc:

    + +

    A reference to the callback function, which will be called by the system +when the right softkey is pressed.

    + +
  • +
+

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);
+}
+
\ No newline at end of file