ListBox

Displays a list of items in a list box dialog.

Syntax

rhinoscriptsyntax.ListBox (items, message=None, title=None, default=None)

rhinoscript.userinterface.ListBox (items, message=None, title=None, default=None)

Parameters

items

Required.  List.  A list of items.

message

Optional.  String.  A prompt or message.

title

Optional.  String.  A dialog box title.

default

Optional.  The default selected item

Returns

String

The selected item if successful.

None

If not successful, or on error.

Example

import rhinoscriptsyntax as rs

layers = rs.LayerNames()

if layers:

    result = rs.ListBox(layers, "Layer to set current")

    if result: rs.CurrentLayer( result )

 

 

Also See

CheckListBox

ComboListBox

MultiListBox

PropertyListBox