Create a listview

listview text collection size
(listview text collection size index)

Creates a listview in the graphics output window with the text as a caption and items from the collection as a content.
Size is a two- or four-element collection; 1st and 2nd element is the position with respect to the left and top borders of the window, respectively; 3rd and 4th element (if present) is the width and the height of the button, respectively. Size and location are given in pixels and do not depend on the drawing scales.
Initial selection index can be provided optionally; by default none of items is selected. Current selection index can be obtained with the getvalue instruction. If nothing is selected, then index value is -1.


"l := listview "List {abc def 123} {10 10 120 100}
setonchange :l [print :new]

Listview widget in the graphics window. Current selection index is printed in the text output on each change.


See also:

Table of Content