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

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

Return to Documentation Home I Return to Sangoma Support