howl.ui.ListWidget

Overview

ListWidget is a graphical widget containing a List component. A ListWidget is primarily used to display a selection list attached to the command line. For example, the interact.select interaction uses the ListWidget to display a selection list. It can be used wherever a graphical component is expected, such as in a popup.

ListWidget handles keystrokes bound to the ‘cursor-up’, ‘cursor-down’, ‘cursor-page-up’ and ‘cursor-page-down’ commands to change the currently selected item. The default keystrokes bound to these commands are the up, down , pgup and pgdn keys respectively.

The ListWidget automatically adjusts it size to accommodate the content of the associated list.


See also:

Constructor

ListWidget (list, opts={})

Creates a new ListWidget.

Properties

height

The height of the widget.

.max_height_request

The desired maximum height for the widget, in pixels. The height is rounded down to the closest multiple of the line height, and is then used for specifying .max_rows for the associated list. Write only.

.showing

true when the widget is currently showing or false when hidden. Read-only.

width

The width of the widget.

Methods

hide ()

Hides the widget.

show ()

Shows the widget.