MultiSelectMenu — Make multiple selections at one prompt¶
Bases: consolemenu.ConsoleMenu
-
class
consolemenu.
MultiSelectMenu
(title=None, subtitle=None, formatter=None, prologue_text=None, epilogue_text=None, ack_item_completion=True, show_exit_option=True, exit_option_text='Exit', clear_screen=True)[source]¶ Console menu that allows the selection of multiple menu items at a single prompt.
Parameters: - title – The menu title.
- subtitle – The menu subtitle.
- formatter – The menu formatter instance for styling the menu.
- prologue_text – The text to display in the prologue section of the menu.
- epilogue_text – The text to display in the epilogue section of the menu.
- show_exit_option (bool) – Determines if the exit item should be displayed.
- exit_option_text (str) – Text for the Exit menu item. Defaults to ‘Exit’.
- clear_screen (bool) – Set to False to disable clearing of screen between menus
-
append_item
(item)[source]¶ Add an item to the end of the menu before the exit item.
Note that Multi-Select Menus will not allow a SubmenuItem to be added, as multi-select menus are expected to be used only for executing multiple actions.
Parameters: item ( MenuItem
) – The item to be addedRaises: TypeError – If the specified MenuIem is a SubmenuItem.