Vizard 8 » Command Index » Vizard objects » node3d » <node3d:GUI:droplist>.getItem
8.0

<node3d:GUI:droplist>.getItem

This action will return the text of the specified item.

<node3d:GUI:droplist>.getItem(  
index  
)  
index
The zero-based index of the item.

Remarks

This command will return the text for the item at the specified index. If the index is invalid, an empty string will be returned.

Return Value

The text of the specified item

Example

droplist = viz.addDropList()
droplist.setPosition(.5,.5)
options = ['A','B','C','D']
droplist.addItems(options)
print(droplist.getItem(0)) #Outputs A