ExitItem

Bases: cursesmenu.items.MenuItem

class cursesmenu.items.ExitItem(menu=None, *, override_index=None)[source]

The exit item for a menu.

Changes representation based on whether the menu is a submenu or the root menu.

Parameters

menu (Optional[CursesMenu]) – the menu for this item

show(index_text)[source]

Get the representation of this item dependent on whether it’s in a submenu or the root menu.

Parameters

index_text (str) –

Return type

str

Returns

The representation of this item