|
1 |
|
2 <!DOCTYPE html |
|
3 PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|
4 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><meta name="copyright" content="(C) Copyright 2009"/><meta name="DC.rights.owner" content="(C) Copyright 2009"/><meta name="DC.Type" content="mobileconcept"/><meta name="DC.Title" content="setRightSoftkeyLabel()"/><meta name="DC.Relation" scheme="URI" content="GUID-ED95464B-9BA7-4294-A06F-CA80429B70ED"/><meta name="DC.Relation" scheme="URI" content="GUID-6359AD9D-2D02-4265-8B47-AF18713AB726"/><meta name="DC.Relation" scheme="URI" content="GUID-7C69DDA4-16F1-4A8F-BDB2-4CB0015B4E81"/><meta name="DC.Relation" scheme="URI" content="GUID-857CF71D-3398-40C2-981A-DEC428A7BA6B"/><meta name="DC.Format" content="XHTML"/><meta name="DC.Identifier" content="GUID-5610C4B8-8988-4895-8F88-36F444B4ACFC"/><title>setRightSoftkeyLabel() </title><script type="text/javascript"> |
|
5 function initPage() {} |
|
6 </script><link href="../PRODUCT_PLUGIN/book.css" rel="stylesheet" type="text/css"/><link href="css/s60/style.css" rel="stylesheet" type="text/css" media="all"/></head><body onload="initPage();"><div class="body"><div class="contentLeft prTxt"><h1 class="pageHeading" id="GUID-5610C4B8-8988-4895-8F88-36F444B4ACFC">setRightSoftkeyLabel()</h1><div> |
|
7 <p><strong>Description:</strong></p> |
|
8 <p>Call the <code>setRightSoftkeyLabel</code> method to customize |
|
9 the label and the operation associated with the right softkey.</p> |
|
10 <p>By default, the right softkey of a device is assigned to the "Exit" |
|
11 function, which terminates a running widget. The default label depends on |
|
12 the current used system language (<code>Exit</code> for English).</p> |
|
13 <p>For more general information on using softkeys in your widget, see <a href="GUID-94946735-D23B-49C6-BB65-8BE31737AE42.html#GUID-94946735-D23B-49C6-BB65-8BE31737AE42">Using softkeys</a>.</p> |
|
14 <p><strong>Syntax:</strong></p> |
|
15 <pre class="codeblock" id="GUID-68C30FF5-39E6-4000-96D4-3B4DAF4107BF">[void] window.menu.setRightSoftkeyLabel(String label, Function callbackfunc) </pre> |
|
16 <p>or</p> |
|
17 <pre class="codeblock" id="GUID-654A91FF-7E28-44C0-B33D-B71D8A8D59AD">[void] menu.setRightSoftkeyLabel(String label, Function callbackfunc)</pre> |
|
18 <p><strong>Arguments:</strong></p> |
|
19 <ul> |
|
20 <li><p><code>label</code>:</p> |
|
21 |
|
22 <p>A text string specifies the label to be shown on the right softkey.</p> |
|
23 |
|
24 </li> |
|
25 <li><p><code>callbackfunc</code>:</p> |
|
26 |
|
27 <p>A reference to the callback function, which will be called by the system |
|
28 when the right softkey is pressed.</p> |
|
29 |
|
30 </li> |
|
31 </ul> |
|
32 <p><strong>Return value:</strong></p> |
|
33 <p>This method does not return a value.</p> |
|
34 <p><strong>Remarks:</strong></p> |
|
35 <p>The default label and "Exit" function of the right softkey can be restored |
|
36 by calling the <code>setRightSoftkeyLabel</code> with an empty string |
|
37 ('') specified for the <code>label</code> argument and the <code>callbackfunc</code> argument |
|
38 set to <code>null</code>.</p> |
|
39 <p><strong>Example code:</strong></p> |
|
40 <pre class="codeblock" id="GUID-1DC7DEC9-A8A7-4DCE-AE9D-FC494C03BF70">function switchToSettingsView() |
|
41 { |
|
42 // implement and show settings |
|
43 ... |
|
44 // customize the right softkey |
|
45 window.menu.<code>setRightSoftkeyLabel</code>('Back', returnToMainView); |
|
46 }</pre> |
|
47 <pre class="codeblock" id="GUID-B79117B2-FAE0-4CED-9A04-B05EC59427E0">function returnToMainView() |
|
48 { |
|
49 // show main view |
|
50 ... |
|
51 // restore the default right softkey |
|
52 window.menu.<code>setRightSoftkeyLabel</code>('', null); |
|
53 }</pre> |
|
54 </div></div></div><div class="footer"><hr/><div class="copy">© Nokia 2009.</div></div></body></html> |