CheckListBox

Displays a list of items in a checkable-style list box dialog.

Syntax

rhinoscriptsyntax.CheckListBox( items, message=None, title=None)

Parameters

items

Required.  List or tuple.  A list of tuples containing a string and a boolean check state

message

Optional.  String.  A prompt or message.

title

Optional.  String.  A dialog box title.

Returns

List

A list of tuples containing the input string in items along with their new boolean check value.

None

If not successful, or on error.

Example

import rhinoscriptsyntax as rs

layers = rs.LayerNames()

if layers:

    items = [(layer, rs.IsLayerOn(layer)) for layer in layers]

    results = rs.CheckListBox(items, "Turn layers on/off", "Layers")

    if results:

        for layer, state in results: rs.LayerVisible(layer, state)

 

 

Also See

ComboListBox

ListBox

MultiListbox

PropertyListBox