org.symbian.tools.wrttools.doc.WRTKit/html/WRTKit_SelectionMenu_Class-GUID-3ae54fdf-e938-400b-969d-e41575331aa0.html
changeset 230 7848c135d915
equal deleted inserted replaced
229:716254ccbcc0 230:7848c135d915
       
     1 <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
       
     2 <html lang="en" xml:lang="en">
       
     3 <head>
       
     4 <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
       
     5 <meta name="copyright" content="(C) Copyright 2005" />
       
     6 <meta name="DC.rights.owner" content="(C) Copyright 2005" />
       
     7 <meta content="concept" name="DC.Type" />
       
     8 <meta name="DC.Title" content="WRTKit SelectionMenu Class" />
       
     9 <meta scheme="URI" name="DC.Relation" content="WRTKit_API_Reference-GUID-00e47c27-0a1a-443f-ae85-cf3381635170.html" />
       
    10 <meta content="XHTML" name="DC.Format" />
       
    11 <meta content="GUID-3AE54FDF-E938-400B-969D-E41575331AA0" name="DC.Identifier" />
       
    12 <meta content="en" name="DC.Language" />
       
    13 <link href="commonltr.css" type="text/css" rel="stylesheet" />
       
    14 <title>
       
    15 WRTKit SelectionMenu Class</title>
       
    16 </head>
       
    17 <body id="GUID-3AE54FDF-E938-400B-969D-E41575331AA0"><a name="GUID-3AE54FDF-E938-400B-969D-E41575331AA0"><!-- --></a>
       
    18 
       
    19 
       
    20 
       
    21     <h1 class="topictitle1">
       
    22 WRTKit SelectionMenu Class</h1>
       
    23 
       
    24     <div>
       
    25 
       
    26         <div class="section"><h2 class="sectiontitle">
       
    27 Description</h2>
       
    28 
       
    29             
       
    30             <p>
       
    31 
       
    32                 The SelectionMenu class is an implementation of a selection control that lets
       
    33                 users select options from a popup menu.
       
    34             </p>
       
    35 
       
    36             <p>
       
    37 
       
    38                 The SelectionMenu control has two modes: a display mode and a selection mode.
       
    39                 Normally the display mode is shown and users can see what the currently selected
       
    40                 options are. When a user selects the control a menu pops up that displays the
       
    41                 available options. The user can then select the option (or options) from this
       
    42                 menu. After the selection is done the menu goes away and the control returns to
       
    43                 display mode. The SelectionMenu control is useful in situations where there
       
    44                 are many options and showing them all uses up too much space.
       
    45             </p>
       
    46 
       
    47             <div class="fignone" id="GUID-3AE54FDF-E938-400B-969D-E41575331AA0__GUID-2E45D9D7-D1FF-4271-A8EC-3EF46BCA768D"><a name="GUID-3AE54FDF-E938-400B-969D-E41575331AA0__GUID-2E45D9D7-D1FF-4271-A8EC-3EF46BCA768D"><!-- --></a><span class="figcap">Figure 1. 
       
    48 SelectionMenu control</span>
       
    49 
       
    50                 
       
    51                 <br /><img src="SelectionMenu_Control_Screenshot_1.png" /><br />
       
    52             </div>
       
    53 
       
    54         </div>
       
    55 
       
    56         <div class="section"><h2 class="sectiontitle">
       
    57 Inherits from</h2>
       
    58 
       
    59             
       
    60             <p>
       
    61 
       
    62                 <a href="WRTKit_SelectionControl_Class-GUID-35c4291f-dc3a-439c-890f-1d140864aca0.html">
       
    63 SelectionControl</a>
       
    64             </p>
       
    65 
       
    66         </div>
       
    67 
       
    68     </div>
       
    69 
       
    70     <div>
       
    71 <div class="familylinks">
       
    72 <div class="parentlink"><strong>Parent topic:</strong> <a href="WRTKit_API_Reference-GUID-00e47c27-0a1a-443f-ae85-cf3381635170.html">WRTKit API Reference</a></div>
       
    73 </div>
       
    74 </div>
       
    75 <div class="nested1" id="GUID-C81342E7-7AFF-4071-94A2-95FB56C1AEE9"><a name="GUID-C81342E7-7AFF-4071-94A2-95FB56C1AEE9"><!-- --></a>
       
    76 
       
    77         <h2 class="topictitle2">
       
    78 Constructor</h2>
       
    79 
       
    80         <div>
       
    81 
       
    82             <div class="section"><h3 class="sectiontitle">
       
    83 Syntax</h3>
       
    84 
       
    85                 
       
    86                 <pre>
       
    87 [SelectionMenu] new SelectionMenu(String id, String caption, Array options, Boolean multipleSelection, Array|Option selected)</pre>
       
    88 
       
    89             </div>
       
    90 
       
    91             <div class="section"><h3 class="sectiontitle">
       
    92 Description</h3>
       
    93 
       
    94                 
       
    95                 <p>
       
    96 
       
    97                     Creates a new instance of the SelectionMenu class.
       
    98                 </p>
       
    99 
       
   100             </div>
       
   101 
       
   102             <div class="section"><h3 class="sectiontitle">
       
   103 Arguments</h3>
       
   104 
       
   105                 
       
   106                 <br /><ul>
       
   107 
       
   108                     <li>
       
   109 
       
   110                         <p>
       
   111 id</p>
       
   112 
       
   113                         
       
   114 
       
   115                             <p>
       
   116 
       
   117                                 Unique identifier for the control. Can be retrieved using the id property defined
       
   118                                 in the UIElement class that this control inherits from. Useful for example to
       
   119                                 identify the source of an event in event callback functions or to apply a CSS
       
   120                                 rule to only this particular control. The identifier can be null, in which case
       
   121                                 no id will be set for the control.
       
   122                             </p>
       
   123 
       
   124                         
       
   125                     </li>
       
   126 
       
   127                     <li>
       
   128 
       
   129                         <p>
       
   130 caption</p>
       
   131 
       
   132                         
       
   133 
       
   134                             <p>
       
   135 
       
   136                                 The caption text for the control. A null caption can be used to hide the 
       
   137                                 caption area. The value is an XHTML string.
       
   138                             </p>
       
   139 
       
   140                         
       
   141                     </li>
       
   142 
       
   143                     <li>
       
   144 
       
   145                         <p>
       
   146 options</p>
       
   147 
       
   148                         
       
   149 
       
   150                             <p>
       
   151 
       
   152                                 An array of options that the selection menu should display to the user.
       
   153                                 If the argument is omitted or null the control will not display any 
       
   154                                 options. The options can be set or changed later by calling setOptions().
       
   155                                 Options are objects with two properties: value and text. Use JavaScript
       
   156                                 object notation (JSON) to construct option objects, e.g.
       
   157                                 <samp class="codeph">
       
   158 { value: "value here", text: "Text for value goes here" }</samp>.
       
   159                                 The text value is an XHTML string.
       
   160                             </p>
       
   161 
       
   162                         
       
   163                     </li>
       
   164 
       
   165                     <li>
       
   166 
       
   167                         <p>
       
   168 multipleSelection</p>
       
   169 
       
   170                         
       
   171 
       
   172                             <p>
       
   173 
       
   174                                 The multipleSelection argument is a boolean flag that determines whether
       
   175                                 the control should be in multipleSelection mode or not. Use true to put
       
   176                                 the control in multiple selection mode and false to put it in single
       
   177                                 selection mode. If this argument is omitted the control will go to single
       
   178                                 selection mode by default.
       
   179                             </p>
       
   180 
       
   181                         
       
   182                     </li>
       
   183 
       
   184                     <li>
       
   185 
       
   186                         <p>
       
   187 selected</p>
       
   188 
       
   189                         
       
   190 
       
   191                             <p>
       
   192 
       
   193                                 The selected argument specifies which of the options should be selected at
       
   194                                 creation time. For multiple selection controls this should be given as an
       
   195                                 array of option objects with an empty array if no options should be selected.
       
   196                                 For single selection controls this should be the single option object that
       
   197                                 should be selected or null if no option should be selected. If the argument
       
   198                                 is omitted or null no options will be selected.
       
   199                             </p>
       
   200 
       
   201                         
       
   202                     </li>
       
   203 
       
   204                 </ul>
       
   205 
       
   206             </div>
       
   207 
       
   208             <div class="section"><h3 class="sectiontitle">
       
   209 Return value</h3>
       
   210 
       
   211                 
       
   212                 <p>
       
   213 
       
   214                     A new instance of the SelectionMenu class.
       
   215                 </p>
       
   216 
       
   217             </div>
       
   218 
       
   219         </div>
       
   220 
       
   221     </div>
       
   222 
       
   223 
       
   224 </body>
       
   225 </html>