UI module

list_item

procedure · 1 overloadsince 0.31.0Source

A row in a list or tree: highlighted when selected, indented by indent points. Returns true when clicked.

list_item :: (
    text: string,
    selected: bool = false,
    indent: float = 0,
    loc := #caller_location
) -> clicked: bool

A row in a list or tree: highlighted when selected, indented by indent points. Returns true when clicked.

Parameters

text: string
the row's text. It is copied for the frame.
selected: bool
whether to draw it highlighted.
indent: float
extra space on the left, in points.
loc := #caller_location
the call site. It identifies the widget from one frame to the next, so leave the default.

Returns

clicked: bool

See also