Phone API Reference - UI Classes (Widgets) - Input
Desk Phone API features described in this section are deprecated and supported only on the following models: D40, d45, d50, d60, d62, d65, d70
Creates a text entry widget that can be used to receive input via the phone's number pad. This widget manages the softkeys themselves; therefore, you are advised not to change them programmatically.
Class Constructor
new Input()
Constructs a new text Input Object.
var inputObj = new Input(x, y, widght, height); |
Â
Initialization Parameters
Name | Required | Type | Default | Description |
---|---|---|---|---|
x | Yes | integer | Â | x coordinate value for top left corner. |
height | Yes | integer | Â | Height in pixels. |
y | Yes | integer | Â | y coordinate value for top left corner. |
width | Yes | integer | Â | Width in pixels. |
This Class inherits methods and properties from the Widget Base Class. See Widget Base Class  for more information about setting your Object's x, y, w, and h properties or adding children to it.
Â
Methods
Name | Description |
---|---|
Sets up a softkey that cycles through a set of modes. Can be any of "normal", "email", "ip", or "numeric". | |
Replaces a range of text from the input widget with another string. | |
Returns the value of the input (same as the value property). |
Properties
Name | Description |
---|---|
textColor | Color of the text. Can be white or black for D40, D50, and D70, or any of the colors specified in the Base Class color properties for the D6X models. |
firstUpper |  If set to true, user input for this Input widget will begin cycling with capitalized letters rather than lowercase for the first character. Basic Example: textObj.firstUpper = true; An example use case for this would be input for names or other proper nouns. |
mode | Controls the characters inserted when number keys are pressed on the keypad. Can be normal, email, ip, numeric. |
onchange | Function to be called whenever the contents changes. |
position | Get or set current position of the cursor. Basic Example: var cursorAt = inputObj.position;
inputObj.position = 0; //back to the beginning. |
value | Get the current value or set the value of the Input. Basic Example: |