Import std.term.views
ListView
class
Public Class ListView
A list of Items, one of which is Selected, which Draw shows in a Region, scrolled to keep the selected one in view, with its Marker before it and drawn in SelectedLook, over ItemLook. HandleKey moves the selection with Up, Down, Page Up, Page Down, Home, and End, and HandleMouse with a click or the wheel.
Examples
Local list = ListView(["one", "two", "three"])
list.HandleKey(KeyEvent(KeyCode.DOWN))
Expect(list.Selected == 1 && list.SelectedItem == "two")-
Its items, in order.
-
What's before the selected item, with as many spaces before each other one.
-
How the items look.
-
How the selected item looks.
-
A list of
items, the first selected. -
Which item is selected, from 0, or -1 for an empty list. Setting it keeps it in the list.
-
The selected item, or Null for an empty list.
-
Moves the selection as
keysays, and gives whether it was one of its keys, which an empty list has none of. -
Selects the item a press of the left button in
areais on, or moves the selection three items for the wheel, and gives whether it did. -
Takes a key or the mouse's
eventinarea, and gives whether it took it. -
Draws the items that fit in
area, one a row, scrolled to keep the selected one in view.
Report an issue with this page or with FutureBlitz on GitHub.