<viz>.addDropList

Adds a drop list affixed by default to the screen.

 

<viz>.addDropList(
    scene = viz.MainScene    
    parent = viz.SCREEN    

)

 

scene = viz.MainScene

If the parent is viz.WORLD, viz.SCREEN, or viz.HEAD, then the argument represents the scene to add the object to.
If the parent is viz.ORTHO, then the argument represents the window to add the object to.
If the parent is a valid node3d object, then the argument is ignored.


parent = viz.SCREEN

viz.WORLD
viz.SCREEN
viz.HEAD
viz.ORTHO
<node3d> object


Remarks

A droplist is a GUI object which allows the user to select an option from a list. When the user make a selection a viz.LIST_EVENT is generated. A viz.BUTTON_EVENT is generated when the droplist gains/loses input focus.

Return Value

<node3d:GUI:droplist> object

Example

object = viz.addDropList()
object.addItems(['1','2'])
object.setPosition([.5,.5,0])

See also

<viz>.addButton
<viz>.addButtonLabel
<viz>.addCheckbox
<viz>.addProgressBar
<viz>.addRadioButton
<viz>.addSlider
<viz>.addText
<viz>.addTextbox