TDXMorph4

List View1.1

A list you build into toolsReal-time composition, enhanced

List View shows your data as a tidy list with columns, and lets people edit, resize and reorder it by hand. This page shows how a person works with a list, and how you fill it and style it in your own tool.

Drop it in

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.

Clicks

Using a list

Do thisTo
Click a row

Select it. The row stays highlighted.

Double-click a row

Trigger that row. What happens depends on the tool the list is in.

Click an icon in a row

Run that button's action, for example delete the row.

Right-click empty space

Show the tool's own menu, if it has one.

Drop an operator onto the list

Hand it to the tool, which decides what to do with it.

Editing

Editing a cell

Do thisTo
Double-click 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.

Layout

Arranging columns and rows

Do thisTo
Drag a column border

Make the column wider or narrower.

Right-click a column name

Rename the column, or align its text left, center or right.

Drag a row up or down

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.

Building

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.
Give each row a hidden id of its own. Then the selection follows that row when the list reorders or refreshes, and clears when the row is gone.
Columns

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.
Look

Styling it

Change the look on the component's parameters, no code needed.

Do thisTo
Pick a Skin on the Look page

Repaint the whole list: Carbon, Verdigris or Mono.

Header font, Cell font, Cell padding

Set the text sizes and the space inside each cell.

Row lines, Column lines

Draw lines between rows or between columns.

Change a colour on the Colors page

Set one colour by hand: rows, hover, select, header, header text, text, value or lines.

Pulse Apply Skin

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.