Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Phone API Reference - UI Extended - screen.addListHeaders

screen.addListHeaders

Description

Returns a Group object stylized in the manner of other Digium apps and can be added above a List object.

Basic Example: 

Code Block
var headers = screen.addListHeaders(parameters);

Parameters

Name

Required

Type

Default

Description

columns

Yes

array

Array of objects in the format

Code Block
{'text' : 'titleText', 'w' : (int)widthOfColumn}.

y

No

integer

4

Vertical position.

Examples

screen.addListHeaders header line 1 text line below the top of the screen

Code Block
var screen = require('screen');
var headers = screen.addListHeaders({
    'y' : Text.LINE_HEIGHT,
    'columns' : [
        {'text' : 'Column1', 'w' : list.w * 0.5},
        {'text' : 'OtherColumn', 'w' : list.w * 0.5}
    ]
});
  
var list = new List(listParams); // see the List object
  
window.add(headers);
window.add(list);

List headers on a blank window
Simple list headers created, returned, and added to window.