Phone API Reference - UI Classes (Widgets) - Widget (Base Class) - setSoftkey
Phone API Reference - UI Classes (Widgets) - Widget (Base Class) - setSoftkey
setSoftkey
Â
Description
Sets the label and (optionally) handler for a specific softkey when this widget has keyboard focus.
Basic Example:Â
 exampleObj.setSoftkey(keyNum, label[, handler]); |
Parameters
Name | Required | Type | Default | Description |
---|---|---|---|---|
keyNum | Yes | integer | Â | Softkeys are labeled 1-4. |
label | Yes | string | Â | Label to display above the key. |
handler | No | function | Â | Function to execute when the softkey is pressed. This function is assigned as Widget.onsoftkeyX (X being the softkey's number.) |
Examples
widget.setSoftkey sets the first softkey to display 'Test' when this widget has focus
 testWidget.setSoftkey(1, 'Test', testFunction); |