the open list's scrolling box, or null while closed; its offset is what a test reads
the view's current width: width, or what the longest label needed with autoWidth
how many rows the open list shows at once (fewer than maxVisibleRows for a short list)
Removes all internal references and listeners as well as removes children from the display list.
Do not use a Container after calling destroy.
Optionaloptions: DestroyOptions
Options parameter. A boolean will act as if all options have been set to that value
lets a list that would run off the bottom of a height-tall viewport show fewer rows
A key for the view: closed, Enter/Space/ArrowDown open it; open, the arrows, Page and Home/End move the highlight (the list scrolls to keep it in view), Enter picks it and Escape closes without changing the choice.
true when the key was used, so the caller does not also act on it
A press at a screen position: closes the open list, keeping the old choice, when it landed outside the button and the list.
true when it closed the list
Protectedmeasurehow wide text is as a row's caption, plus the button's own padding
redraws the closed label and the open list from the model; call after changing the model directly
Sets the view's width (capped at maxWidth when one was given) and redraws the closed
button and, when open, the list at the new width, so a layout change resizes the widget
in place instead of rebuilding it.
The widget for a
Dropdownmodel: a button showing the current choice that opens a column of buttons beneath it, the highlighted row marked withButton.setSelected. Picking a row selects it, closes the list and fires the model'sonChange; clicking the closed button again closes it.The list sits on an opaque backdrop, shows at most
maxVisibleRowsrows and scrolls (wheel, touch drag, keys, scrollbar) beyond that, opening with the chosen row in view.autoWidthmeasures the labels so none is cut off (maxWidthcaps that widening), andresize(width)re-lays the button and list in place. Opening scrolls to the model's current selection:model.setHighlight(i); model.confirm()is a whole programmatic pick, after which the next opening shows that row. The keyboard goes throughhandleKey(arrows, Page, Home, End, Enter, Escape) and a click elsewhere throughhandleOutsideClick, which the owning scene forwards from its own input, since the view does not own the stage.The list is drawn in this container's own space below the button, so a game places the view where the closed button should sit and keeps it above its siblings when it is open.
Example