SubmenuItem
Bases: cursesmenu.items.MenuItem
- class cursesmenu.items.SubmenuItem(text, submenu=None, menu=None, *, should_exit=False, override_index=None)[source]
A menu item that opens a submenu.
- Parameters:
text (
str
) – The text of the itemsubmenu (
Optional
[CursesMenu
]) – A CursesMenu to be displayed when the item is selectedmenu (
Optional
[CursesMenu
]) – The menu that this item belongs toshould_exit (
bool
) – Whether the menu will exit when this item is selected
- clean_up()[source]
Block until the submenu is done and then return to the parent.
- Return type:
None
- property menu: CursesMenu | None
Get the menu that this item belongs to.
- property submenu: CursesMenu | None
Get the submenu associated with this item.