JavaScript

A5.ListBoxLayout Object

Description

Definition of a column in a layout in the list.

Discussion

There are two main types of list layouts. These are "column" layouts and "template" layouts.

In "column" layouts the list will be formatted as a grid with columns of data. An array of column object (see A5.ListBox Column Object) is used to define the layout.

There are three types of "template" layouts. These are "template", "template-flow" and "template-horizontal". In the base "template" layout, a free-form template will be used to create each list item. The items will be arranged vertically, each item taking up an entire line. In a "template-flow" layout each item in the list will be flowed one after the other, creating a snaking layout. In a "template-horizontal" layout the list items will be arranged onto a single horizontally scrolling line.

Properties

typestring

The type of layout. Layout types include "column", "template", "template-flow", "template-horizontal", and "cutsom".

columnsarray

An array of A5.ListBox Column Object objects to use for columnar layouts, or to display for sorting at the top of free-form layouts.

templatestring

The template for the row in a free-form layout, or an additional free-form layout to include in each row of a columnar layout. See A5.u.template.

drawfunction(type,data,element)

Draw method for a "custom" layout. The scope of the function will be the A5.ListBox.

typestring

The type of draw. The value will be either "initial", "refresh", or "resize".

dataarray

The data to draw.

elementelement

The element that contains the "custom" layout.

scrollobject

Scroll settings overrides for the layout.

itemobject

Settings for the list items in this layout.

widthstring

The width of the list item in CSS units.

heightstring

The height of the list item in CSS units.

classNamestring

The class name to put on a list item.

hoverClassNamestring

The class name to put on a list item when the user mouses over it.

selectedClassNamestring

The class name to put on a list item when it is selected.

stylestring

The CSS to put on a list item.

titleClassNamestring

The class name to put on a list group title item.

separatorClassNamestring

The class name to put on a list item separator.

itemsobject

The definition of named items to be used in this layout. See A5.ListBox Item Object.