Phone API Reference - UI Classes (Widgets) - List
Desk Phone API features described in this section are deprecated and supported only on the following models: D40, d45, d50, d60, d62, d65, d70
Scrolling table with row-wise navigation capabilities. Useful for menus, lists of calls, etc. The user can scroll through a list with the up and down direction keys after it is given focus.Â
List text is black on white background, and the selected/highlighted item is inverted. The width of the selected item highlight is that of the List Object itself and not of the summation of column widths.
When referring to columns and rows, indexes always begin at 0.
Class Constructor
new List()
Constructs a new List Object.
var listObj = new List(x, y, width, height);
Â
Initialization Parameters
Name | Required | Type | Default | Description |
---|---|---|---|---|
x | Yes | integer | Â | x coordinate value for top left corner. |
y | Yes | integer | Â | y coordinate value for top left corner. |
width | Yes | integer | Â | Width in pixels. |
height | Yes | integer | Â | Height 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 |
---|---|
Removes all child elements from the group or removes all content from the list. | |
Retrieves contents of a specific cell in the list. | |
Selects the specified row. | |
Sets the contents of the given cell in the List. | |
Sets the widths of each column in pixels. If the last value is set to 0, it will use all remaining space to fill the list's width. |
Properties
Name | Description |
---|---|
Function that takes row and column numbers as parameters and returns the text for a cell. When this property is set, the function is immediately executed. | |
cols | Number of columns. Columns are numbered from 0, starting on the left. |
Callback function called when the selection changes. | |
rowHeight | Number of pixels high each row should be. Defaults to Text.LINE_HEIGHT in D40, D50, and D70, but defaults to Text.ROW_HEIGHT for D6X models. |
rows | Number of rows the list contains. Rows are numbered from 0, starting at the top of the list. |
Returns the currently selected row number or set the row you wish to be selected. |