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 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:


ListWidget (list, opts={})

Creates a new ListWidget.



The height of the widget.


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.


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


The width of the widget.


hide ()

Hides the widget.

show ()

Shows the widget.