JavaScript

A5.ListBoxsetDisplay Method

Syntax

A5.ListBox.setDisplay(part,display)

A5.ListBox.setDisplay(part,column)

Arguments

partstring

The part of the list to either hide or show. Values can be "header", "footer", "column-header", "content-header", "content-footer", "scroller" or "column".

displayboolean

Whether or not to display a given part of the list.

columnobject

If the part is "column", then the column object must be passed in.

layoutstring

The name of the layout that the columns should be shown/hidden. If no value is passed in, then the current layout will be updated.

columnnumberarray

The column index(es). To show and hide multiple columns pass in an array of indexes.

displaybooleanarray

Whether or not to display a given column. When showing or hiding multiple columns, either a single boolean value for all columns can be passed in or an array of booleans for each column.

Description

Show or hide parts of the list. The list will automatically be resized if needed.

Example

// To get a pointer to the A5.ListBox class see {dialog.object}.getControl
// assume lObj is a pointer to an instance of the A5.ListBox class
lObj.setDisplay('header',false); // hide the list header
lObj.setDisplay('column',{layout: 'columnar1', column: [1,3], display: false}); // hide the 2nd and 4th columns in the layout "columnar1"

Example: Display Individual Columns 

The setDisplay() method can be used to show/hide specific columns in a List Control in a UX Component. For example, the following method will hide columns 0, 1, and 2 in a columnar List:

var lObj = {dialog.object}.getControl('list1');

lObj.setDisplay('column',{column: [0,1,2], display: [false,false,false]})

See Also