DropdownOption
Inherits: Control
Represents an item in a dropdown.
Properties
-
content(Optional[Control]) –A
Controlto display in this option. If not specified,textwill be used as fallback, elsetextwill be ignored. -
key(Optional[str]) –Option's key.
-
leading_icon(Optional[IconDataOrControl]) –An optional icon to display before the content or text.
-
style(Optional[ButtonStyle]) –Customizes this menu item's appearance.
-
text(Optional[str]) –Option's display text.
-
trailing_icon(Optional[IconDataOrControl]) –An optional icon to display after the content or text.
Properties#
content
class-attribute
instance-attribute
#
A Control to display in this option. If not specified, text will be used as fallback, else text will be ignored.
key
class-attribute
instance-attribute
#
Option's key.
If not specified text will be used as fallback.
Raises:
-
ValueError–If neither
keynortextare provided.
leading_icon
class-attribute
instance-attribute
#
leading_icon: Optional[IconDataOrControl] = None
An optional icon to display before the content or text.
style
class-attribute
instance-attribute
#
style: Optional[ButtonStyle] = None
Customizes this menu item's appearance.
text
class-attribute
instance-attribute
#
Option's display text.
If not specified key will be used as fallback.
Raises:
-
ValueError–If neither
keynortextare provided.
trailing_icon
class-attribute
instance-attribute
#
trailing_icon: Optional[IconDataOrControl] = None
An optional icon to display after the content or text.