All Manuals > CAPI User Guide and Reference Manual > 5 Choices - panes with items

5.4 Trees

tree-view is a pane that displays a hierarchical list of items. Each item may optionally have an image and a checkbox.

Callbacks can be specified as for other choice classes. Additionally you can control how the nodes of the tree are expanded, and there is delete-item-callback available for use when the user presses the Delete key.

Tree views are used in the LispWorks IDE, for example in the Output Data view of the Tracer tool and the Backtrace area of the Debugger and Stepper tools.

5.4.1 Tree interaction

tree-view supports only the :single-selection interaction but you can have :extended-selection functionality by using the subclass extended-selection-tree-view.

5.4.2 Images and appearance

tree-view can include images displayed on the left of each item. To include images supply the initarg :image-function. You can use images from an image-list via the initarg :image-lists.

Additionally, state images are supported on Microsoft Windows, GTK+ and Motif, via the initarg :state-image-function and, if required, :image-lists.

A tree view can have an alternating background color on Cocoa and GTK+, when specified by the initarg :alternating-background.


CAPI User Guide and Reference Manual (Windows version) - 01 Dec 2021 19:33:48