class documentation
Known subclasses: fiftyone.operators.types.AutocompleteView
, fiftyone.operators.types.Dropdown
, fiftyone.operators.types.RadioGroup
, fiftyone.operators.types.TabsView
Constructor: Choices(**kwargs)
Represents a set of choices in a View
.
Use this view to define a set of choices for a Property
that can
be selected by the user and require labels and optional descriptions.
Examples:
import fiftyone.operators.types as types choices = types.Choices() choices.add_choice("cat", label="Cat", description="A cat") choices.add_choice("dog", label="Dog", description="A dog") inputs = types.Object() inputs.enum("animal", choices.values(), view=choices)
Parameters | |
choices | a list of Choice instances |
Method | __init__ |
Undocumented |
Method | add |
Adds a choice value to this instance. |
Method | append |
Appends a Choice to the list of choices. |
Method | clone |
Undocumented |
Method | to |
Undocumented |
Method | values |
Returns the choice values for this instance. |
Property | choices |
Undocumented |
Instance Variable | _choices |
Undocumented |
Inherited from View
:
Method | kwargs |
Undocumented |
Instance Variable | caption |
Undocumented |
Instance Variable | component |
Undocumented |
Instance Variable | components |
Undocumented |
Instance Variable | container |
Undocumented |
Instance Variable | description |
Undocumented |
Instance Variable | label |
Undocumented |
Instance Variable | placeholder |
Undocumented |
Instance Variable | read |
Undocumented |
Instance Variable | space |
Undocumented |
Instance Variable | _kwargs |
Undocumented |
Adds a choice value to this instance.
Parameters | |
value | a choice value |
**kwargs | Undocumented |
Returns | |
the Choice that was added |