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

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 

Name 

Description 

clear

Removes all child elements from the group or removes all content from the list.

get

Retrieves contents of a specific cell in the list.

select

Selects the specified row.

set

Sets the contents of the given cell in the List.

setColumnWidths

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 

Name 

Description 

cellFunc

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.

onchange

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.

selected

Returns the currently selected row number or set the row you wish to be selected.

Return to Documentation Home I Return to Sangoma Support