Resources | developer.brewmp.com Resources | developer.brewmp.com

Developer

resources

List container widget

The list container widget is a user interface object that displays multiple items that the user can view or select. For example, a list container widget can display a vertical list of names, or a horizontal row of icons, or even a palette of drawing tools laid out in a grid. The list container widget presents many items and provides an interface for interacting with these items.

Note: The list container widget is more powerful and flexible than the list widget and It is recommended that list container widget be used instead of list widget whenever possible.

There are three types of list container widgets:

  • List container, which lays out list items in a vertical list
  • Pick list container, which lays out list items in a horizontal list
  • Grid list container, which lays out list items in a grid

Note: List container widget is different from other container widgets and does not support the IContainer interface.

A list container widget is populated by providing it a model that contains all of the list items. This model can be one of the following:

  • ListContainerModel - allows items to be created on demand
  • TypedList Model - provides a prepopulated list of items
  • List Model - provides a prepopulated list of items

The list container widget is implemented in terms of a set of widgets visible through a "window". Each widget in the set represents a visible list item. For performance reasons, extra non-visible "ready" list items would also be populated to help live scrolls perform well.

For example, the figure below shows a list container with a list of 8 items. The window allows items 3, 4, and 5 to be visible. When the list container widget is created, it creates only the list items that are needed to fill the window. If the list is scrolled or dragged, the list container widget asks the model to create the new items needed to fill the window.