The ml.listMixin
namespace contains functions for creating and configuring a ListContent
object to be used in a list component.
To create a ListContent
object using the ml.listMixin
namespace, you can follow these steps:
- Create a
ListSettings
object using thecreateListSettings()
function. This object defines the general settings for the list, such as the layout, dimensions, and focus settings. - Create a
RowSettings
object using thecreateRowSettings()
orcreateGridRowSettings()
function. This object defines the settings for the rows in the list, such as the dimensions, focus settings, and cell settings. - Create a
HeaderSettings
object using thecreateHeaderSettings()
function. This object defines the settings for the headers in the list, such as the label, height, font, and color. - Create a
CellSettings
object using thecreateCellSettings()
function. This object defines the settings for the cells in the list, such as the dimensions, space, and screen position. - Create a
FocusSettings
object using thecreateFocusSettings()
function. This object defines the focus settings for the list, such as the animation style, offsets, and feedback style. - Use the
createListContent()
function to create aListContent
object using the settings objects created in steps 1-5.
Here is an example of how to create a ListContent
object using the ml.listMixin
namespace:
' Create a ListSettings object
listSettings = ml.listMixin.createListSettings()
' Create a RowSettings object
rowSettings = ml.listMixin.createRowSettings()
' Create a HeaderSettings object
headerSettings = ml.listMixin.createHeaderSettings()
' Create a CellSettings object
cellSettings = ml.listMixin.createCellSettings()
' Create a FocusSettings object
focusSettings = ml.listMixin.createFocusSettings()
' Create a ListContent object using the settings objects
listContent = ml.listMixin.createListContent(focusSettings, rowSettings, listSettings)
Once you have created a ListContent
object, you can use the getRowSettings()
, getCellSettings()
, and getFocusSettings()
functions to retrieve the individual settings for a row, cell, or focus in the list. You can also use the configureRowSettings()
and setTileSettings()
functions to modify the settings for a row or cell in the list.