Phone API Reference - Extended - app - setSoftkeyIcon
Desk Phone API features described in this section are deprecated and supported only on the following models: D40, d45, d50, d60, d62, d65, d70
setSoftkeyIcon
Description
Sets an image object to display at the top left corner of the softkey. Useful for indicating a hard key that calls the same handler. Suggested image size is 5x5 pixels.
Basic Example:Â
 exampleObj.setSoftkeyIcon(keyNum, icon); |
Â
If you require the app library, you can use Digium's set of softkey icons. These image objects are created when the library is required.
app.images.softKeys.left (left arrow)
app.images.softKeys.right (right arrow)
app.images.softKeys.up (up arrow)
app.images.softKeys.down (down arrow)
app.images.softKeys.select (check mark)
app.images.softKeys.cancel (X)
Parameters
Name | Required | Type | Default | Description |
---|---|---|---|---|
keyNum | Yes | integer | Â | Softkeys are labeled 1-4. |
icon | Yes | widget | Â | Instance of a image widget for display. |
Â
Examples
setSoftkeyIcon to set icons for the softkeys: Digium up arrow, Digium checkmark, custom icon
testWidget.setSoftkeyIcon(1, app.images.softKeys.up);
testWidget.setSoftkeyIcon(2, app.images.softKeys.select);
 Â
var imgWidget = new Image("app", "smileyface.png", 0, 0, 5, 5);
testWidget.setSoftkeyIcon(3, imgWidget); |
Â