Getting started
Drop List View into your project. Set Host to the component that owns your data, and Callbacks to the DAT that tells the list what to show and what to do.
The paths editor in Preset Manager and the scene and preset lists in Scene Launcher are List Views too, so everything here works there as well.
Using a list
Select it. The row stays highlighted.
Trigger that row. What happens depends on the tool the list is in.
Run that button's action, for example delete the row.
Show the tool's own menu, if it has one.
Hand it to the tool, which decides what to do with it.
Editing a cell
Type a new value right in the list. This only works in columns that allow editing.
A number stays a number and text stays text. If a cell holds a whole number and you type a fraction, it becomes a decimal.
Arranging columns and rows
Make the column wider or narrower.
Rename the column, or align its text left, center or right.
Move it to a new place in the list. The # column renumbers itself.
Column widths, names and alignment are remembered. They survive a refresh, reopening the project and saving.
Feeding it rows
The list does not hold data of its own. Your Callbacks DAT tells it which columns to show, hands it the rows, and decides what happens on each click, edit, reorder or drop. You only fill in the parts you need. Anything you leave out falls back to the Host component, and then simply does nothing.
- Host: the component that owns your data.
- Callbacks: the DAT with your list's behaviour. Keep it next to the list, not inside it. A plain name works.
- Editable: the master switch for editing. A column must also allow editing.
- Header: show or hide the row of column names.
- Empty Header: keep the column names visible while the list has no rows yet.
Kinds of column
Each column has a name, a width and a kind. A column can stretch to fill spare space, and can show a tip when you hover over it.
- Text: plain words. This is the default.
- Value: numbers, text, on or off, or empty, each in its own colour. Edits keep their type.
- Index: an automatic row number, starting at 1. It renumbers itself when rows move.
- Icon: a small button that runs an action on a click or right-click.
- Badge: a small filled label.
- Swatch: a colour chip.
Styling it
Change the look on the component's parameters, no code needed.
Repaint the whole list: Carbon, Verdigris or Mono.
Set the text sizes and the space inside each cell.
Draw lines between rows or between columns.
Set one colour by hand: rows, hover, select, header, header text, text, value or lines.
Go back to the skin's colours after editing them by hand.
Row (even) and Row (odd) make the striped rows. Set them to the same colour for a flat list.