ListBox

Displays a list of items in a list box dialog.

Syntax

Rhino.ListBox (arrItems [, strMessage [, strTitle [, strDefault [, arrPos]]]])

Parameters

arrItems

Required.  Array.  A zero-based, one-dimensional array of string items.

strMessage

Optional.  String.  A prompt or message.

strTitle

Optional.  String.  A dialog box title.

strDefault

Optional.  String.  The selected item in the list.

arrPos

Optional.  Array.  A 2-D screen point that identifies the upper left corner of the dialog's initial position.

Returns

String

The selected item if successful.

Null

If not successful, or on error.

Example

Dim arrLayers, strResult

arrLayers = Rhino.LayerNames

If IsArray(arrLayers) Then

strResult = Rhino.ListBox(arrLayers, "Layer to set current")

If Not IsNull(strResult) Then

Rhino.CurrentLayer strResult

End If

End If

 

listbox.jpg

 

Also See

CheckListBox

ComboListBox

MultiListBox

PropertyListBox