Skip to main content

Scrollable lists

  • Static List - scroll through popups created in the project
  • List - a simple list populated from scripts
  • Advanced List - a more flexible and complex list populated from scripts
  • Picker - a wheel for scrolling through values, for example to select a time and date

Types of scrollable lists:​

TypeDescription
Static List - list of popupsA list is a project navigation item that lets you place many popups on one page and move between them using gestures. It looks like a graphic item on a page or popup. Its settings specify the list and order of popups to scroll within the item. A popup included in a list cannot be used independently or in another list (a technical limitation).
List - dynamically populated listA list is a scrollable list that can contain many entries based on a single popup template. Each entry's contents are populated by scripts and can be changed while the project is running. Working with a list from scripts is relatively easy, but it does not support moving entries or inserting entries at the beginning or in the middle (all contents must be refreshed).
Advanced List - enhanced dynamically populated listAn enhanced list is also controlled by scripts. It works well with a very large number of entries and allows entries to be added at any position, but takes more time to learn initially.
Picker - picker for scrolling through entriesA picker lets you create a list of entries based on a template and change the number and contents of entries. It can only be created using a script. It is not used to work directly with equipment. A typical use is setting a date or time.

Static List​

A graphic item within which popups can be scrolled, used to create gesture-controlled menus. Equipment commands are assigned to graphic items on the popups included in the list.

A list lets you place many popups on one page and move between them using gestures. It looks like a graphic item on a page or popup. Its settings specify the list and order of popups to scroll within the item. A popup included in a list cannot be used independently or in another list (a technical limitation).

Static_List2.png

Static List settings, in addition to the general settings:

  • Popups List - popups to display in the list
  • Direction : Vertical / Horizontal - vertical or horizontal list scrolling. The list cannot be looped
  • Scroll (scroll bar) - enable or disable list scrolling
  • Resistance (%) - the rate at which the list loses momentum and stops after release
  • Scroll bar - show or hide the scroll bar
  • PullUp Tweener - animation type when scrolling the list
  • PullUp Time - list scrolling speed
  • Attach to - how popups "snap" to the edges of the base list item: to the center, top edge, bottom edge, or both edges:
    • Center - popup centers snap to the list's center line (centering). Not suitable for popups wider (taller) than the list itself;
    • Stick Up - popup left (top) edges snap to the list's left (top) edge. Not suitable for popups wider (taller) than the list itself;
    • Stick Up & Down - popup edges snap to the list edges in the scrolling direction. Suitable for large popups that can be viewed "in parts";
    • Columns - the list is filled with columns of popups. Vertical: left to right and top to bottom. Horizontal: top to bottom and left to right;
    • No - no edge snapping when scrolling stops.
  • Indent (px) - spacing between list popups; unavailable for "Attach to: Center"
  • End Indent - spacing between the last popup and the bottom edge of Static List; unavailable for "Attach to: Center"

List​

A list is a scrollable list that can contain many entries based on a single popup template. Each entry's contents are populated by scripts and can be changed while the project is running. Working with a list from scripts is relatively easy, but it does not support moving entries or inserting entries at the beginning or in the middle (all contents must be refreshed).

A list can be created from scripts without adding a graphic item to the visualization interface. Only the entry template to be cloned must be added to the interface. Remember that list entries execute the commands assigned to the original template.

Instructions for populating a list from JavaScript

List1.png

List settings, in addition to the general settings:

  • Template - the popup template used to build the list (by cloning and populating it with data
  • Direction : Vertical / Horizontal - vertical or horizontal list scrolling. The list cannot be looped
  • Scroll bar - show or hide the scroll bar
  • Resistance (%) - the rate at which the list loses momentum and stops after release

Advanced List​

An enhanced list works well with many entries and can be populated with a data array from a variable. The data is an array of objects, each describing 1 list entry. A list can be based on several entry templates and populated with different data. To update the list, pass it an updated data array.

A command can be assigned to the popup window selected as an entry template; it will be repeated for every list entry

Information about which list entry was pressed is passed to the event listener for IR.EVENT_LIST_ITEM_CHANGE

AdvancedList1.png

Advanced List settings, in addition to the general settings:

  • Direction : Vertical / Horizontal - vertical or horizontal list scrolling;
  • Scroll Bar - display the list's scroll bar;
  • Stop By Tap - stop list movement when touched;
  • Looped - loop the list;
  • Template setting - popup templates used to build the list by cloning. Each template can map the properties of its items to JSON object keys;
  • Data source - the variable to which an array of objects must be written to populate the list (a JSON object). See below for the data structure and ways to associate keys with entry properties.

Example data:

[
{
"__popup": "Folder",
"Name": "Composer 1"
},{
"__popup": "Composition",
"Song Name": "Song one",
"Album": "First",
"Length": "3:25"
},{
"__popup": "Composition",
"Song Name": "Song two",
"Album": "First",
"Length": "2:12"
},{
"__popup": "Folder",
"Name": "Composer 2"
},{
"__popup": "Composition",
"Song Name": "Song three",
"Album": "Second",
"Length": "1:25"
}
]

Template setting - configure popups used as list entry templates and link list entries to JSON object keys:

  1. Select the templates for list entries: popups that will be cloned to create entries.

Template1.png

  1. In each template's settings, create a list of properties to which data from the JSON object must be written. To the right of a property, enter a value: the JSON key whose value will be written to that property. The JSON object can contain different data for different list entries.

Template2.png

  1. In Data source , specify the variable that supplies an array of objects to populate the list.

Template3.png

The resulting list:

Studio2019_AdvancedList_Sample.png

There is also an earlier version of the API for populating lists entirely from a script , but its use is not recommended.

Picker​

A picker lets you scroll through a list of entries and change their number and contents. Its main use is setting a date or time. A picker can only be created using a script; see Picker API.

Create a picker:

  1. create a new popup as the template for a picker row
  2. use Java Script to create the dataset on which the picker will be based (for example, a list of dates and months). Use Picker API to create and populate the list
  3. create the picker's visual design

Instructions for populating Picker from JavaScript

Looped_list.png