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
[Any
]) – A CursesMenu to be displayed when the item is selectedmenu (
Optional
[Any
]) – The menu that this item belongs toshould_exit (
bool
) – Whether the menu will exit when this item is selected
- property menu: Optional[Any]
Get the menu that this item belongs to.
- Return type
Optional
[Any
]
- property submenu: Optional[Any]
Get the submenu associated with this item.
- Return type
Optional
[Any
]