menus.radio module

Provides ShowMenu based functionality.

Bases: menus.radio.PagedRadioMenu

Creates a list-like radio menu.

Navigation options are added automatically.

Initialize the object.

Parameters:

Bases: menus.radio.PagedRadioOption

Provides options for ListRadioMenu objects.

Initialize the option.

Parameters:
  • text (str) – See menus.base._BaseOption.__init__().
  • hightlight (bool) – If True the text will be highlighted.
  • enumerated (bool) – If True the number of the option will be added in front of the text.

Note

highlight only works if enumerated is set to True.

Bases: menus.radio.SimpleRadioMenu, menus.base._PagedMenuBase

Create menus with an unlimited number of options.

Navigation options will be added automatically.

Initialize the object.

Parameters:
  • data (iterable|None) – See menus.base._BaseMenu.__init__().
  • select_callback (callable|None) – See menus.base._BaseMenu.__init__().
  • build_callback (callable|None) – See menus.base._BaseMenu.__init__().
  • close_callback (callable|None) – See menus.base._BaseMenu.__init__().
  • description (str|None) – A description that is displayed under the title.
  • title (str|None) – A title that is displayed at the top of the menu.
  • top_separator (str) – A separator that is displayed right after the title/description.
  • bottom_separator (str) – A separator that is displayed right after the body.
  • fill (bool) – If True the menu will be filled so that it will always have the same size.
  • parent_menu (_BaseMenu) – A menu that will be displayed when hitting ‘Back’ on the first page.

Bases: menus.radio._BaseRadioOption

Provides options for PagedRadioMenu objects.

Bases: menus.base._BaseMenu

This class creates a basic radio menu.

Bases: menus.radio._BaseRadioOption

Provides options for SimpleRadioMenu objects.

Initialize the option.

Parameters:
  • choice_index (int) – The number that is required to select the option.
  • text (str) – See menus.base._BaseOption.__init__().
  • value – See menus.base._BaseOption.__init__().
  • hightlight (bool) – If True the text will be highlighted.
  • selectable (bool) – If True the option will be selectable.